Nothing
#' Simulated plant-science field trial (teaching dataset)
#'
#' A simulated randomized complete block design (RCBD) with repeated measures,
#' created for the \pkg{rfriend} course. It is engineered to exercise the full
#' \code{f_} workflow: data familiarisation, cleaning, transformation, test
#' selection, and reporting. The data are \strong{simulated} and must not be
#' cited as empirical findings.
#'
#' @format A data frame with 60 rows and 8 variables:
#' \describe{
#' \item{block}{Field block (\code{B1}-\code{B5}). Five blocks, the practical
#' minimum number of replicates in plant research. Treat as a random
#' effect: \code{(1 | block)}.}
#' \item{plant_id}{Plant identifier (\code{P01}-\code{P20}). One plant per
#' treatment per block; each plant is measured repeatedly over time, so it
#' is the repeated-measures grouping factor, nested in block:
#' \code{(1 | block/plant_id)}.}
#' \item{treatment}{Experimental treatment (fixed effect), one of
#' \code{"control"}, \code{"low_N"}, \code{"high_N"}, \code{"drought"}.}
#' \item{time_weeks}{Weeks after the start of the trial: 2, 4 or 6. Stored as
#' numeric; convert to a factor (e.g. with \code{\link{f_factors}}) before
#' modelling time as a fixed factor.}
#' \item{height_cm}{Plant height in centimetres. An approximately normal,
#' clean continuous response (suited to \code{\link{f_aov}},
#' \code{\link{f_lmer}}, \code{\link{f_t_test}}).}
#' \item{biomass_g}{Above-ground dry biomass in grams. Right-skewed, suited to
#' demonstrating \code{\link{f_bestNormalize}} and \code{\link{f_boxcox}}.}
#' \item{chloroplast_count}{Chloroplasts per mesophyll cell, counted under the
#' microscope. A non-negative integer count, suited to a Poisson
#' \code{\link{f_glm}}. Correlated with \code{height_cm}, so
#' \code{\link{f_corplot}} shows a real relationship.}
#' \item{infected}{Infection status, a factor with levels \code{"no"} and
#' \code{"yes"}. Use directly with \code{\link{f_chisq_test}} (paired with
#' \code{\link{df_to_table}}); for a binomial \code{\link{f_glm}}, convert
#' to 0/1 with \code{as.numeric(infected == "yes")}.}
#' }
#'
#' @details
#' The intended mixed-model analysis is
#' \code{height_cm ~ treatment * factor(time_weeks) + (1 | block/plant_id)},
#' with treatment and time as fixed effects and block and plant as nested
#' random effects. Treatment, time, and their interaction all have genuine
#' effects built in. A deliberately messy raw version (inconsistent column
#' names, injected outliers, missing values, and a stray factor label) and a
#' wide-format version are distributed alongside the course materials for the
#' import and cleaning modules.
#'
#' @source Simulated data. Generated by \code{generate_course_data.R}; see the
#' course materials for the generating script and the random seed used.
#'
#' @examples
#' data(plant_trial)
#' str(plant_trial)
#' \dontrun{
#' plant_trial$time_f <- factor(plant_trial$time_weeks)
#' f_lmer(height_cm ~ treatment * time_f + (1 | block/plant_id),
#' data = plant_trial)
#' }
"plant_trial"
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.