library(knitr) traits <- params$traits A <- params$A B <- params$B rep <- params$rep design <- params$design data <- params$data maxp <- params$maxp data[, A] <- as.character(data[, A]) data[, B] <- as.character(data[, B]) data[, rep] <- as.character(data[, rep])
The data frame has two factors with r nlevels(as.factor(data[, A]))
and r nlevels(as.factor(data[, B]))
levels. The experimental design is a randomized complete block design with r nlevels(as.factor(data[, rep]))
blocks. The statistical model is
$$
y_{ijk} = \mu + \alpha_i + \beta_j + (\alpha\beta){ij} + \gamma_k + \epsilon{ijk}
$$
where
In this model we assume that the errors are independent and have a normal distribution with common variance, that is, $\epsilon_{ijk} \sim N(0,\sigma_{\epsilon}^2)$.
out <- NULL for (i in 1:length(traits)) { lc <- check.2f(traits[i], A, B, rep, data) if (lc$c1 == 1 & lc$c2 == 1 & lc$c3 == 1 & lc$pmis <= maxp) out <- c(out, knit_expand('child_2f.Rmd')) else out <- c(out, knit_expand('child_2f_fail.Rmd')) }
r paste(knit(text = out), collapse = '\n')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.