Skip to content
Snippets Groups Projects
Commit e7ff8b34 authored by Walmes Zeviani's avatar Walmes Zeviani
Browse files

Add dataset from a CRBD experiment with sugar cane, Pimentel pg 92.

parent ef1e5d0d
No related branches found
No related tags found
No related merge requests found
...@@ -247,3 +247,42 @@ NULL ...@@ -247,3 +247,42 @@ NULL
#' xlab="Variety") #' xlab="Variety")
#' #'
NULL NULL
#' @name sugarcaneYield
#'
#' @title Sugarcane variety experiment
#'
#' @description These data are from an experiment done by The West São
#' Paulo State Sugar Mills Cooperative. The experiment was done in a
#' randomized complete block design with 4 blocks. Sugarcane yield
#' (kg/plot) was recorded in each experimental unit.
#'
#' \itemize{
#' \item \code{block} a categorical unordered factor with 4 levels.
#' \item \code{variety} a categorical unordered factor with 7
#' levels.
#' \item \code{yield} sugarcane yield (kg/plot).
#' }
#'
#' @docType data
#'
#' @keywords datasets
#'
#' @usage data(sugarcaneYield)
#'
#' @format a \code{data.frame} with 28 records and 3 variables.
#'
#' @source Frederico, P. (2009). Curso de Estatística Experimental (15th
#' ed.). Piracicaba, São Paulo: FEALQ. (page 92)
#'
#' @examples
#'
#' require(lattice)
#' data(sugarcaneYield)
#'
#' plot(yield~variety, data=sugarcaneYield,
#' groups=block, type="o",
#' ylab=expression(Yield~(kg~plot^{-1})),
#' xlab="Variety")
#'
NULL
##----------------------------------------------------------------------
## Data generation.
sugarcaneYield <- read.table("http://www.leg.ufpr.br/~walmes/data/pimentel_canadeacucar1.txt",
header=TRUE, sep="\t")
names(sugarcaneYield) <- c("block", "variety", "yield")
str(sugarcaneYield)
sugarcaneYield <- sugarcaneYield[with(sugarcaneYield, order(block, variety)),]
save(sugarcaneYield, file="../data/sugarcaneYield.RData")
##----------------------------------------------------------------------
## Examples.
require(lattice)
xyplot(yield~variety, data=sugarcaneYield,
groups=block, type="o",
ylab=expression(Yield~(kg~plot^{-1})),
xlab="Variety")
rm(list=ls())
load("../data/sugarcaneYield.RData")
ls()
str(sugarcaneYield)
File added
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/legTools.R
\docType{data}
\name{sugarcaneYield}
\alias{sugarcaneYield}
\title{Sugarcane variety experiment}
\format{a \code{data.frame} with 28 records and 3 variables.}
\source{
Frederico, P. (2009). Curso de Estatística Experimental (15th
ed.). Piracicaba, São Paulo: FEALQ. (page 92)
}
\usage{
data(sugarcaneYield)
}
\description{
These data are from an experiment done by The West São
Paulo State Sugar Mills Cooperative. The experiment was done in a
randomized complete block design with 4 blocks. Sugarcane yield
(kg/plot) was recorded in each experimental unit.
\itemize{
\item \code{block} a categorical unordered factor with 4 levels.
\item \code{variety} a categorical unordered factor with 7
levels.
\item \code{yield} sugarcane yield (kg/plot).
}
}
\examples{
require(lattice)
data(sugarcaneYield)
plot(yield~variety, data=sugarcaneYield,
groups=block, type="o",
ylab=expression(Yield~(kg~plot^{-1})),
xlab="Variety")
}
\keyword{datasets}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment