From d492ae848e4b2342ceb2dd1931f67b5e49470c63 Mon Sep 17 00:00:00 2001 From: Walmes Zeviani <walmes@ufpr.br> Date: Sat, 10 Oct 2015 20:12:17 -0300 Subject: [PATCH] Document the dataset of the chapter 13. --- R/legTools.R | 66 +++++++++++++++++++++++++++++++++++++ data-raw/sugarcaneYield5.R | 15 ++++++--- data/sugarcaneYield5.RData | Bin 0 -> 1417 bytes man/sugarcaneYield4.Rd | 4 +++ man/sugarcaneYield5.Rd | 61 ++++++++++++++++++++++++++++++++++ 5 files changed, 142 insertions(+), 4 deletions(-) create mode 100644 data/sugarcaneYield5.RData create mode 100644 man/sugarcaneYield5.Rd diff --git a/R/legTools.R b/R/legTools.R index e063ffe..9a00dd0 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 390604d..9a5a072 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 GIT binary patch literal 1417 zcmb2|=3oE==C?D?2S<mB9FG@1(6lz}WBAsnHHR|ZDpc}w?5|{;G~qsHtJxN>lMaVU z)F#YYQhKBG>8W~#@O3deS99MjeY$F0%+A+6ec9<TR?7FL|F(3{d#j=CSe(wM{{7zP z$JOWde!nw&gTeIeyFbNFOZ};{|9tw-Kd+K!`~S5}-5NQ!%RYYh?!Xo6M7MRF-roK6 ztK#WT<<&-A=d^w;ReZH_HRrM0qNN&DZWl9M=SiMFy1DDzg70(Eqb^#y>T6U5PE7x< z>Z-3@<$7^-S6pyO+{M>j_X0{BFV60|7gQ1$*uQAIXl&4zzD4DtU$tIkKg@dgYyP88 zH5Jb{UG2MYr=(lHbN!YdffcJ|*ZzI|`}dNM$(zpmbA@03cJO<4x1Zh5s4wvgmaU&J z`}EP?q@8Im#W(j~{AT_1P*|+Xs@AHdn^HBlt)I$mdhzz=Fs(ILwL`zY^zSa;G}~_f z;#=bHV$Ob?Wu0j{YxchNKZD#)X1{A!J)3+&-}cJq>$|qbN$h<Q9;Ns1r}EXh0{zA2 z9Q=#q>y|u^J$Bc4m;U3&KlmH7S$+#2x;Wdd?!?8S#h!QPyVbMVcs_HN=ua@;==|qF z(eEuaEPFNoaGvk9{ouB7dhMFZy2#s|3Ff^uaxvH4zgA4D6RQ8YzO<fmZ_AU`pLf>J zO7AS6_vd`Ga_9UL@2%EZD$fsm#Jh0%fw(iNdpqs9;t#~FxH4xy&qp=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HHQ^SbNoS*w(GjGkd#`9($ZnD|kK9DZ`BZnCx*w=X8 z@Pj3r-SGp@C4R^-&rg0(%u{o&W25o+|8H$8H?+*ZEpHcbrhnVU`70jA@87FA<BEHw gpyIuEo$@uZwV(at+<Rv)aja*wPpW<NLY{#E02}M?l>h($ literal 0 HcmV?d00001 diff --git a/man/sugarcaneYield4.Rd b/man/sugarcaneYield4.Rd index d86df2e..6ee5559 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 0000000..5c32028 --- /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} + -- GitLab