Skip to content
Snippets Groups Projects
Commit 367b6825 authored by Fernando Mayer's avatar Fernando Mayer
Browse files

Merge branch 'dataset/1' into 'master'

Dataset/1

Dataset 1 was included. Please, review the English.

See merge request !2
parents 34b30c0e 200bcb09
No related branches found
No related tags found
No related merge requests found
Package: legTools Package: legTools
Title: Convenience Functions, Small GUI to Teach Statistics and Some Datasets Title: Convenience Functions, Small GUI to Teach Statistics and Some Datasets
Version: 0.1-0 Version: 0.1-0
Authors@R: person("First", "Last", email = "first.last@example.com", role = c("aut", "cre")) Authors@R: person("LEG", "Core Team", email = "leg.ufpr@gmail.com", role =
Description: legTools is a collection of R functions and datasets, maintained by the LEG group (Statistics and Geoinformation Laboratory). c("aut", "cre"))
Depends: R (>= 3.2.1) Description: legTools is a collection of R functions and datasets used for
academic purposes. These functions mainly include small GUI to teach
statistics, conveninece functions to visualize data and datasets, nost part
of them from books. It is maintained by the LEG group (Statistics and
Geoinformation Laboratory). Please visit http://www.leg.ufpr.br.
Depends:
R (>= 3.2.1)
Imports:
lattice,
latticeExtra
Suggests:
plyr,
rpanel,
gWidgets
License: GPL-3 | file LICENSE License: GPL-3 | file LICENSE
URL: http://git.leg.ufpr.br/leg/legTools URL: http://git.leg.ufpr.br/leg/legTools
BugReports: http://git.leg.ufpr.br/leg/legTools/issues BugReports: http://git.leg.ufpr.br/leg/legTools/issues
LazyData: true LazyData: false
...@@ -6,3 +6,41 @@ ...@@ -6,3 +6,41 @@
##' @docType package ##' @docType package
##' @name legTools ##' @name legTools
NULL NULL
#' @name wgpigs
#'
#' @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
#'
#' @usage data(wgpigs)
#'
#' @format a \code{data.frame} with 20 records and 2 variables.
#'
#' @source Frederico, P. (2009). Curso de Estat{\'i}stica Experimental
#' (15th ed.). Piracicaba, S{\~a}o Paulo: FEALQ.
#'
#' @examples
#'
#' require(lattice)
#' data(wgpigs)
#'
#' xyplot(wg~ft, data=wgpigs,
#' ylab="Weight gain (kg)",
#' xlab="Feeding type")
#'
NULL
## require(roxygen2)
## setwd("/home/walmes/GitHub/")
## roxygenise(package.dir="wzRfun")
require(devtools)
if(!grepl(x=getwd(), pattern="/legTools$")){
stop("Move to /legTools directory.")
}
## Create/update NAMESPACE, *.Rd files.
document()
## Check documentation.
check_doc()
## Check functions, datasets, run examples, etc.
check()
## Load the package.
load_all()
## Show all exported objects.
ls("package:legTools")
packageVersion("legTools")
## build()
## build_win()
##----------------------------------------------------------------------
## Data generation.
wgpigs <- read.table("http://www.leg.ufpr.br/~walmes/data/pimentel_racoes.txt",
header=TRUE, sep="\t")
names(wgpigs) <- c("ft","wg")
str(wgpigs)
save(wgpigs, file="../data/wgpigs.RData")
##----------------------------------------------------------------------
## Examples.
require(lattice)
xyplot(wg~ft, data=wgpigs,
ylab="Weight gain (kg)",
xlab="Feeding type")
rm(list=ls())
load("../data/wgpigs.RData")
ls()
str(wgpigs)
File added
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/legTools.R
\docType{package} \docType{package}
\name{legTools} \name{legTools}
\alias{legTools} \alias{legTools}
......
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/subsetDropAll.R
\name{subsetDropAll} \name{subsetDropAll}
\alias{subsetDropAll} \alias{subsetDropAll}
\title{Drop unused levels after subset} \title{Drop unused levels after subset}
......
% Generated by roxygen2 (4.1.1): do not edit by hand
\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{\'i}stica Experimental
(15th ed.). Piracicaba, S{\~a}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)
data(wgpigs)
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.
Please register or to comment