## Multiple Sclerosis
data(MS, package = "ER")
er <- ER(proteins ~ MS * cluster, data = MS)
print(er)
plot(er) # Raw data, first feature
plot(er,2) # Raw data, numbered feature
plot(er,'Q76L83', col='MS', pch='cluster') # Selected colour and plot character
plot(er,'Q76L83', what='effect MS',
model.line='effect cluster') # Comparison of factors (points and lines)
# \donttest{
# Example compound plot
old.par <- par(c("mfrow", "mar"))
# on.exit(par(old.par))
par(mfrow = c(3,3), mar = c(2,4,4,1))
plot(er,'Q76L83') # Raw data, named feature
plot(er,'Q76L83', what='fits') # Fitted values
plot(er,'Q76L83', what='residuals') # Residuals
plot(er,'Q76L83', what='effect MS') # Effect levels
plot(er,'Q76L83', what='effect cluster') # ----||----
plot(er,'Q76L83', what='effect MS:cluster') # ----||----
plot(er,'Q76L83', what='MS') # ER values
plot(er,'Q76L83', what='cluster') # --------||---------
plot(er,'Q76L83', what='MS:cluster') # --------||---------
par(old.par)
# }
# Complete overview of ER
tab <- tableER(er, 1)
# In general there can be more than two, effects, more than two levels, and continuous effects:
# MS$three <- factor(c(rep(1:3,33),1:2))
# er3 <- ER(proteins ~ MS * cluster + three, data = MS)
## Lactobacillus
data(Lactobacillus, package = "ER")
erLac <- ER(proteome ~ strain * growthrate, data = Lactobacillus)
print(erLac)
plot(erLac) # Raw data, first feature
plot(erLac,2) # Raw data, numbered feature
plot(erLac,'P.LSA0316', col='strain',
pch='growthrate') # Selected colour and plot character
plot(erLac,'P.LSA0316', what='strain',
model.line='growthrate') # Selected model.line
## Diabetes
data(Diabetes, package = "ER")
erDia <- ER(transcriptome ~ surgery * T2D, data = Diabetes)
print(erDia)
plot(erDia) # Raw data, first feature
plot(erDia,2) # Raw data, numbered feature
plot(erDia,'ILMN_1720829', col='surgery',
pch='T2D') # Selected colour and plot character
Run the code above in your browser using DataLab