diff --git a/R/legTools.R b/R/legTools.R index e063ffe004fcc55f393db350b56edd7a0f2e775d..9a00dd0aab275a54f8974e29748dc948f52a8152 100644 --- a/R/legTools.R +++ b/R/legTools.R @@ -700,6 +700,10 @@ NULL #' @source Pimentel Gomes, F. (2009). Curso de Estatística Experimental #' (15th ed.). Piracicaba, São Paulo: FEALQ. (page 126) #' +#' Straus, E. (1951). Experimentos de adubação na zona canavieira de +#' Pernambuco. In: Anais da III Reunião Brasileira de Ciência do +#' Solo. 1:336-443. +#' #' @examples #' #' library(lattice) @@ -1505,3 +1509,65 @@ NULL #' } #' NULL + +#' @name sugarcaneYield5 +#' +#' @title A set of 38 essays on the effect of P in sugar cane yield +#' +#' @description Sugar cane yield evaluated in a set of 38 +#' experiments. In each one was a triple factorial of NPK +#' dosage. These data correspond to the mean values by level of P +#' and the mean squares of each complete analysis. +#' +#' \itemize{ +#' +#' \item \code{essay} an integer that represent each single experiment. +#' +#' \item \code{sugarcane} indicates which harvest the yield corresponts +#' to. \code{"plant"} represents the first harvest of the crop and +#' \code{"ratoon"} represents the second harvest. +#' +#' \item \code{P} phosphorus levels in kg/ha of \eqn{\textrm{P}_2 +#' \textrm{O}_5}. +#' +#' \item \code{yield} sugar cane yield (ton/ha). +#' +#' } +#' +#' @docType data +#' +#' @keywords datasets +#' +#' @usage data(sugarcaneYield5) +#' +#' @format a \code{data.frame} with 228 records and 4 variables. An +#' attribute \code{MSE} is a \code{data.frame} (76 by 3) with mean +#' square error estimate from the analysis of the complete data in +#' each experiment. +#' +#' @source Pimentel Gomes, F. (2009). Curso de Estatística Experimental +#' (15th ed.). Piracicaba, São Paulo: FEALQ. (page 259) +#' +#' Straus, E. (1951). Experimentos de adubação na zona canavieira de +#' Pernambuco. In: Anais da III Reunião Brasileira de Ciência do +#' Solo. 1:336-443. +#' +#' @examples +#' +#' library(lattice) +#' +#' data(sugarcaneYield5) +#' str(sugarcaneYield5) +#' +#' xyplot(yield~P|sugarcane, groups=essay, +#' data=sugarcaneYield5, type="o", +#' ylab=expression(Yield~(ton~ha^{-1})), +#' xlab=expression(P[2]*O[5]~(kg~ha^{-1}))) +#' +#' xyplot(yield~P|essay, groups=sugarcane, +#' data=sugarcaneYield5, auto.key=TRUE, +#' type="o", strip=FALSE, +#' ylab=expression(Yield~(ton~ha^{-1})), +#' xlab=expression(P[2]*O[5]~(kg~ha^{-1}))) +#' +NULL diff --git a/data-raw/sugarcaneYield5.R b/data-raw/sugarcaneYield5.R index 390604d6b56c7d3399a08c21f106e4297dbc3ffc..9a5a0724b6dd14c7bcc011997be64993a9239751 100644 --- a/data-raw/sugarcaneYield5.R +++ b/data-raw/sugarcaneYield5.R @@ -38,9 +38,11 @@ qmr$mse <- c(66.4, 65.0, 187.5, 83.4, 185.7, 64.4, 254.6, 88.6, 85.9, 185.2, 14.1) attr(sugarcaneYield5, "MSE") <- qmr +save(sugarcaneYield5, file="../data/sugarcaneYield5.RData") + ##---------------------------------------------------------------------- -aggregate(yield~sugarcane+P, data=sugarcaneYield5, FUN=mean) +aggregate(yield~P+sugarcane, data=sugarcaneYield5, FUN=mean) m0 <- lm(yield~factor(essay)+factor(P), data=subset(sugarcaneYield5, sugarcane=="plant")) @@ -65,12 +67,17 @@ data(sugarcaneYield5) str(sugarcaneYield5) xyplot(yield~P|sugarcane, groups=essay, - data=sugarcaneYield5, type="o") + data=sugarcaneYield5, type="o", + ylab=expression(Yield~(ton~ha^{-1})), + xlab=expression(P[2]*O[5]~(kg~ha^{-1}))) xyplot(yield~P|essay, groups=sugarcane, - data=sugarcaneYield5, type="o", strip=FALSE) + data=sugarcaneYield5, auto.key=TRUE, + type="o", strip=FALSE, + ylab=expression(Yield~(ton~ha^{-1})), + xlab=expression(P[2]*O[5]~(kg~ha^{-1}))) rm(list=ls()) load("../data/sugarcaneYield5.RData") ls() -str(sugarcaneYield4) +str(sugarcaneYield5) diff --git a/data/sugarcaneYield5.RData b/data/sugarcaneYield5.RData new file mode 100644 index 0000000000000000000000000000000000000000..a4fdfccc38ecd5c2f9169b5b8eb383073ea003d4 Binary files /dev/null and b/data/sugarcaneYield5.RData differ diff --git a/man/sugarcaneYield4.Rd b/man/sugarcaneYield4.Rd index d86df2ed284bcaed511dc6b781d9aec4ac990e2b..6ee5559b4c71b69df3f8308e484af39597f2e58c 100644 --- a/man/sugarcaneYield4.Rd +++ b/man/sugarcaneYield4.Rd @@ -8,6 +8,10 @@ \source{ Pimentel Gomes, F. (2009). Curso de Estatística Experimental (15th ed.). Piracicaba, São Paulo: FEALQ. (page 126) + +Straus, E. (1951). Experimentos de adubação na zona canavieira de + Pernambuco. In: Anais da III Reunião Brasileira de Ciência do + Solo. 1:336-443. } \usage{ data(sugarcaneYield4) diff --git a/man/sugarcaneYield5.Rd b/man/sugarcaneYield5.Rd new file mode 100644 index 0000000000000000000000000000000000000000..5c320283756981cfbe389799a5c541310194bad7 --- /dev/null +++ b/man/sugarcaneYield5.Rd @@ -0,0 +1,61 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/legTools.R +\docType{data} +\name{sugarcaneYield5} +\alias{sugarcaneYield5} +\title{A set of 38 essays on the effect of P in sugar cane yield} +\format{a \code{data.frame} with 228 records and 4 variables. An + attribute \code{MSE} is a \code{data.frame} (76 by 3) with mean + square error estimate from the analysis of the complete data in + each experiment.} +\source{ +Pimentel Gomes, F. (2009). Curso de Estatística Experimental + (15th ed.). Piracicaba, São Paulo: FEALQ. (page 259) + +Straus, E. (1951). Experimentos de adubação na zona canavieira de + Pernambuco. In: Anais da III Reunião Brasileira de Ciência do + Solo. 1:336-443. +} +\usage{ +data(sugarcaneYield5) +} +\description{ +Sugar cane yield evaluated in a set of 38 + experiments. In each one was a triple factorial of NPK + dosage. These data correspond to the mean values by level of P + and the mean squares of each complete analysis. + +\itemize{ + +\item \code{essay} an integer that represent each single experiment. + +\item \code{sugarcane} indicates which harvest the yield corresponts + to. \code{"plant"} represents the first harvest of the crop and + \code{"ratoon"} represents the second harvest. + +\item \code{P} phosphorus levels in kg/ha of \eqn{\textrm{P}_2 +\textrm{O}_5}. + +\item \code{yield} sugar cane yield (ton/ha). + +} +} +\examples{ +library(lattice) + +data(sugarcaneYield5) +str(sugarcaneYield5) + +xyplot(yield~P|sugarcane, groups=essay, + data=sugarcaneYield5, type="o", + ylab=expression(Yield~(ton~ha^{-1})), + xlab=expression(P[2]*O[5]~(kg~ha^{-1}))) + +xyplot(yield~P|essay, groups=sugarcane, + data=sugarcaneYield5, auto.key=TRUE, + type="o", strip=FALSE, + ylab=expression(Yield~(ton~ha^{-1})), + xlab=expression(P[2]*O[5]~(kg~ha^{-1}))) +} +\keyword{datasets} +