weights: weights: Weight Gain in Cows under Different Diets

weightsR Documentation

weights: Weight Gain in Cows under Different Diets

Description

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.

Usage

weights

Format

A data frame with 48 observations (rows) and 3 variables (columns).

Column name Data type Description Values
[,1] supplement factor 3 diet supplements (agrimore, control, supergain, supersupp)
[,2] diet factor 3 different diets (barley, oats, wheat)
[,3] gain numeric The weight gain in kg (15.78 - 29.03)

Source

⁠The R book⁠, M.J. Crawley, Wiley, 2007.

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)


thoree/stat340 documentation built on June 30, 2024, 4:04 p.m.