yields.unstacked: yields.unstacked: Unstacked Yields Data

yields.unstackedR Documentation

yields.unstacked: Unstacked Yields Data

Description

This data is from a crop experiment where the crops were grown in three different soil types, and the yield was taken from 10 randomly chosen fields per soil type. This is the unstacked version of the data, with one column for each soil type.

Usage

yields.unstacked

Format

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

Column name Data type Description Values
[,1] sand integer Yield from fields with sand (6 -17)
[,2] clay integer Yield from fields with clay (3 - 17)
[,3] loam integer Yield from fields with loam (9 - 18)

See Also

yields

Examples


# Summary of the variables
summary(yields.unstacked)

# Combining the columns into one single column
# with factor as data type
stacked_yields <- stack(yields.unstacked)

# Renaming the columns of the transformed data frame
colnames(stacked_yields) <- c("yields", "soil")


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