This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
hist(rnorm(1000))
#
library(mlmRev)
## Warning: package 'mlmRev' was built under R version 4.0.5
## Loading required package: lme4
## Warning: package 'lme4' was built under R version 4.0.4
## Loading required package: Matrix
#
library(lattice)
#
dta <- Chem97
#
dta$age = dta$age + 18.5
#
histogram(~gcsescore | factor(score), data=dta)
#
tp1 <- histogram(~gcsescore | factor(score), data=dta)
#
tp2 <- densityplot(~ gcsescore,
groups=score,
data=dta,
plot.points=F,
auto.key=list(space="right",title="score"))
# (col.position, row.position, n.col, n.row)
plot(tp1, split=c(1,1,1,2))
# put the second trellis obj at row 2
plot(tp2, split=c(1,2,1,2), newpage=F)
###