R/weights.R

#' weights: Weight Gain in Cows under Different Diets
#'
#' This is data from a farm-scale trial of animal diets, a factorial experiment.
#' 48 cows were given combinations of three different diets and three diet
#' supplements. 12 of the cows did not have supplements to the diet. The weight
#' gain for each cow was measured after six weeks.
#'
#' @format A data frame with 48 observations (rows) and 3 variables (columns).
#' \tabular{llllr}{
#'   \tab \bold{Column name} \tab \bold{Data type} \tab \bold{Description} \tab \bold{Values}\cr
#'   \code{[,1]} \tab \code{supplement} \tab factor \tab 3 diet supplements \tab (agrimore, control, supergain, supersupp)\cr
#'   \code{[,2]} \tab \code{diet} \tab factor \tab 3 different diets \tab (barley, oats, wheat)\cr
#'   \code{[,3]} \tab \code{gain} \tab numeric \tab The weight gain in kg \tab (15.78 - 29.03)
#' }
#'
#' @examples
#'
#' # A short summary of the variables
#' summary(weights)
#'
#' # Weight gain without diet supplement
#' controls <- weights[which(weights$supplement == "control"), ]
#' boxplot(gain ~ diet, data = weights)
#'
#' @source `The R book`, M.J. Crawley, Wiley, 2007.
#'
#' @docType data
#' @keywords datasets
#' @name weights
#' @usage weights
#'
"weights"
thoree/stat340 documentation built on June 30, 2024, 4:04 p.m.