Barley | R Documentation |
This data set contains results from an experiment with a total of 32 samples of yield of barley pr. 1000 square meter. The experiment was done to see the dependency of the yield of barley, and the factors are varieties of barley, soil types and types of fertilizers. In addition, the experiment was done in two different geographical areas.
Barley
A data frame with 32 observations (rows) and 5 variables (columns).
Column name | Data type | Description | Values | |
[,1] | Yield | numeric | Yield of barley in kg pr. 1000 m^2 | (257.2 - 536.6) |
[,2] | Variety | character | 2 varieties of barley | ("C1", "C2") |
[,3] | Soil | character | 2 soil types | ("Sand", "Clay") |
[,4] | Fertilizer | character | 2 types of fertilizers | ("Fert1", "Fert2") |
[,5] | Site | character | 2 different geographical areas | ("Site1", "Site2") |
# A short summary of the variables
summary(Barley)
# Sorted by Yield
Barley_sorted <- Barley[order(-Barley$Yield), ]
head(Barley_sorted)
# Linear model
lm(Yield ~ Variety + Soil, data = Barley)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.