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

add files for the first dataset.

parent 6177ed43
No related branches found
No related tags found
No related merge requests found
...@@ -6,3 +6,41 @@ ...@@ -6,3 +6,41 @@
##' @docType package ##' @docType package
##' @name legTools ##' @name legTools
NULL NULL
#' @title Feeding type in pig weight gain
#'
#' @description This is an artifial dataset corresponding a experiment
#' to study the effect of feeding type (factor with 4 categorical
#' nominal levels) in pig weight gain. The experiment was a randomized
#' complete design with five experimental units per treatment level. The
#' experimental unit was a pig. The response measured was weight gain from
#' the beggining to the end of the experiment.
#'
#' \itemize{
#' \item ft feeding type, a categorical factor with 4 levels.
#' \item wg weight gain (kg).
#' }
#'
#' @docType data
#'
#' @keywords datasets
#'
#' @name wgpigs
#'
#' @usage data(wgpigs)
#'
#' @format a \code{data.frame} with 20 records and 2 variables.
#'
#' @source Frederico, P. (2009). Curso de Estatística Experimental (15th
#' ed.). Piracicaba, São Paulo: FEALQ.
#'
#' @examples
#'
#' require(lattice)
#'
#' xyplot(wg~ft, data=wgpigs,
#' ylab="Weight gain (kg)",
#' xlab="Feeding type")
#'
#' @export
NULL
##----------------------------------------------------------------------
## Data generation.
da <- read.table("http://www.leg.ufpr.br/~walmes/data/pimentel_racoes.txt",
header=TRUE, sep="\t")
names(da) <- c("ft","wg")
str(da)
save(da, file="../data/wgpigs.rda")
wgpigs <- da
##----------------------------------------------------------------------
## Examples.
require(lattice)
xyplot(wg~ft, data=wgpigs,
ylab="Weight gain (kg)",
xlab="Feeding type")
File added
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/legTools.R
\docType{data}
\name{wgpigs}
\alias{wgpigs}
\title{Feeding type in pig weight gain}
\format{a \code{data.frame} with 20 records and 2 variables.}
\source{
Frederico, P. (2009). Curso de Estatística Experimental (15th
ed.). Piracicaba, São Paulo: FEALQ.
}
\usage{
data(wgpigs)
}
\description{
This is an artifial dataset corresponding a experiment
to study the effect of feeding type (factor with 4 categorical
nominal levels) in pig weight gain. The experiment was a randomized
complete design with five experimental units per treatment level. The
experimental unit was a pig. The response measured was weight gain from
the beggining to the end of the experiment.
\itemize{
\item ft feeding type, a categorical factor with 4 levels.
\item wg weight gain (kg).
}
}
\examples{
require(lattice)
xyplot(wg~ft, data=wgpigs,
ylab="Weight gain (kg)",
xlab="Feeding type")
}
\keyword{datasets}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment