library(knitr) # Pass arguments traits <- params$traits factors <- params$factors rep <- params$rep design <- params$design dfr <- params$dfr maxp <- params$maxp # Check factors structure out <- ck.fs(factors, rep, dfr) dfr <- out$dfr nla <- out$nl[1] nlb <- out$nl[2] nrep <- out$nrep nmis.fac <- out$nmis.fac dfr[, factors[1]] <- as.character(dfr[, factors[1]]) dfr[, factors[2]] <- as.character(dfr[, factors[2]]) dfr[, rep] <- as.character(dfr[, rep])
The data frame has two factors with r nla
and r nlb
levels. The experimental design is a randomized complete block design with r nrep
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)$.
r if (nmis.fac == 1) paste("Note: There is", nmis.fac, "row with missing values for classifications factors. This row has been deleted.")
r if (nmis.fac > 1) paste("Note: There are", nmis.fac, "rows with missing values for classifications factors. These rows have been deleted.")
out <- NULL for (i in 1:length(traits)) { lc <- ck.f(traits[i], factors, rep, dfr) if (lc$nt.0 == 0 & lc$nrep > 1 & lc$nt.mult == 0 & lc$pmis <= maxp) { out <- c(out, knit_expand('child_f.Rmd')) } else { out <- c(out, knit_expand('child_f_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.