weights | R Documentation |
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.
weights
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) |
The R book
, M.J. Crawley, Wiley, 2007.
# A short summary of the variables
summary(weights)
# Weight gain without diet supplement
controls <- weights[which(weights$supplement == "control"), ]
boxplot(gain ~ diet, data = weights)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.