ComponentModel_DryMatter.Rmd 725 Bytes
Newer Older
Lie-Piang, Anouk's avatar
Lie-Piang, Anouk committed
1
--
2
title: "Dry matter model"
Lie-Piang, Anouk's avatar
Lie-Piang, Anouk committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
output:
  html_notebook: default
---

#Import data
```{r}
library(readxl)
Component_Data <- read_excel("Component_Data.xlsx", 
    sheet = "Sheet1") #Fill in the category to be analysed: Isolates, Mildly refined, Mixtures, Alldata 
attach(Component_Data) 
#detach(Component_Data)
```

#rename variables
17
```{r}
Lie-Piang, Anouk's avatar
Lie-Piang, Anouk committed
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
dm = `Dry matter (%)`
viscosity = log(`Final viscosity (mPa.s)`)
```


## Load libraries
```{r}
library(MASS)
library(tidyverse)
library(ggplot2)
library(heatmap3)
library(corrplot)
library(cowplot)
library(car)
library(R2HTML)
library(readxl)


```
# Create all possible formulas
```{r}
model= lm(viscosity~ dm, data=Component_Data)
summary(model)
plot(model)
HTML2clip(model)