Commit d31c14c4 authored by Lie-Piang, Anouk's avatar Lie-Piang, Anouk
Browse files

Update FractionModel.Rmd

parent daa02877
...@@ -6,16 +6,15 @@ output: html_notebook ...@@ -6,16 +6,15 @@ output: html_notebook
#Import data #Import data
```{r} ```{r}
library(readxl) library(readxl)
FractionData <- read_excel("Fractiondata.xlsx", FractionData <- read_excel("Fill in the name of your excel file.xlsx",
sheet = "Alldata_average") sheet = "fill in the name of your sheet")
attach(FractionData) attach(FractionData)
#rename data #rename data
viscosity = log(`Final viscosity (mPa.s)`) viscosity = log(`Final viscosity (mPa.s)`)
dehulledcoarse = `Coarse fraction (%)` coarse = `Coarse fraction (%)`
dehulledfine = `Fine fraction (%)` fine = `Fine fraction (%)`
flour = `Flour (%)` #also dehulled flour = `Flour (%)`
hull = `Hull (%)`
protisol = `Protein isolate (%)` protisol = `Protein isolate (%)`
starchisol = `Starch isolate (%)` starchisol = `Starch isolate (%)`
fibreisol = `Fibre isolate (%)` fibreisol = `Fibre isolate (%)`
...@@ -35,7 +34,7 @@ library(readxl) ...@@ -35,7 +34,7 @@ library(readxl)
``` ```
#Create model #Create model
```{r} ```{r}
model= lm(viscosity~ dehulledcoarse + dehulledfine + flour + hull+ protisol + starchisol + fibreisol, data=FractionData) model= lm(viscosity~ coarse + fine + flour + protisol + starchisol + fibreisol, data=FractionData)
``` ```
```{r} ```{r}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment