Roxygen 2.2

1 parent aeb08e0 commit 33de14539c314b96ec832af252dda658d3d2d193 committed Nov 11, 2011
4 man/a_ply.Rd
 @@ -3,7 +3,7 @@ \title{Split array, apply function, and discard results.} \usage{ a_ply(.data, .margins, .fun = NULL, ..., .expand = TRUE, - .progress = "none", .print = FALSE) + .progress = "none", .print = FALSE) } \arguments{ \item{.data}{matrix, array or data frame to be processed} @@ -45,7 +45,7 @@ \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \keyword{manip}
6 man/aaply.Rd
 @@ -3,7 +3,7 @@ \title{Split array, apply function, and return results in an array.} \usage{ aaply(.data, .margins, .fun = NULL, ..., .expand = TRUE, - .progress = "none", .drop = TRUE, .parallel = FALSE) + .progress = "none", .drop = TRUE, .parallel = FALSE) } \arguments{ \item{.fun}{function to apply to each piece} @@ -16,7 +16,7 @@ \item{.data}{matrix, array or data frame to be processed} \item{.margins}{a vector giving the subscripts to split - up \code{data} by. 1 splits up by rows, 2 by columns and + up \code{data} by. 1 splits up by rows, 2 by columns and c(1,2) by rows and columns, and so on for higher dimensions} @@ -78,7 +78,7 @@ aaply(ozone, 1:2, diff) \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \seealso{ Other array input: \code{\link{adply}},
 @@ -3,7 +3,7 @@ \title{Split array, apply function, and return results in a data frame.} \usage{ adply(.data, .margins, .fun = NULL, ..., .expand = TRUE, - .progress = "none", .parallel = FALSE) + .progress = "none", .parallel = FALSE) } \arguments{ \item{.fun}{function to apply to each piece} @@ -16,7 +16,7 @@ \item{.data}{matrix, array or data frame to be processed} \item{.margins}{a vector giving the subscripts to split - up \code{data} by. 1 splits up by rows, 2 by columns and + up \code{data} by. 1 splits up by rows, 2 by columns and c(1,2) by rows and columns, and so on for higher dimensions} @@ -55,7 +55,7 @@ \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \seealso{ Other array input: \code{\link{aaply}},
6 man/alply.Rd
 @@ -3,7 +3,7 @@ \title{Split array, apply function, and return results in a list.} \usage{ alply(.data, .margins, .fun = NULL, ..., .expand = TRUE, - .progress = "none", .parallel = FALSE) + .progress = "none", .parallel = FALSE) } \arguments{ \item{.fun}{function to apply to each piece} @@ -16,7 +16,7 @@ \item{.data}{matrix, array or data frame to be processed} \item{.margins}{a vector giving the subscripts to split - up \code{data} by. 1 splits up by rows, 2 by columns and + up \code{data} by. 1 splits up by rows, 2 by columns and c(1,2) by rows and columns, and so on for higher dimensions} @@ -53,7 +53,7 @@ alply(ozone, 3, function(x) table(round(x))) \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \seealso{ Other array input: \code{\link{aaply}},
2 man/as.data.frame.function.Rd
 @@ -3,7 +3,7 @@ \title{Make a function return a data frame.} \usage{ \method{as.data.frame}{function} (x, row.names, optional, - ...) + ...) } \arguments{ \item{x}{function to make return a data frame}
14 man/baseball.Rd
 @@ -3,9 +3,6 @@ \alias{baseball} \title{Yearly batting records for all major league baseball players} \format{A 21699 x 22 data frame} -\usage{ - baseball -} \description{ This data frame contains batting statistics for a subset of players collected from @@ -35,23 +32,24 @@ baberuth <- subset(baseball, id == "ruthba01") baberuth\$cyear <- baberuth\$year - min(baberuth\$year) + 1 calculate_cyear <- function(df) { -mutate(df, -cyear = year - min(year), -cpercent = cyear / (max(year) - min(year)) -) + mutate(df, + cyear = year - min(year), + cpercent = cyear / (max(year) - min(year)) + ) } baseball <- ddply(baseball, .(id), calculate_cyear) baseball <- subset(baseball, ab >= 25) model <- function(df) { -lm(rbi / ab ~ cyear, data=df) + lm(rbi / ab ~ cyear, data=df) } model(baberuth) models <- dlply(baseball, .(id), model) } \references{ \url{http://www.baseball-databank.org/} } +\keyword{dataset} \keyword{datasets}
6 man/d_ply.Rd
 @@ -2,8 +2,8 @@ \alias{d_ply} \title{Split data frame, apply function, and discard results.} \usage{ - d_ply(.data, .variables, .fun = NULL, ..., .progress = - "none", .print = FALSE) + d_ply(.data, .variables, .fun = NULL, ..., + .progress = "none", .print = FALSE) } \arguments{ \item{.data}{data frame to be processed} @@ -37,7 +37,7 @@ \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \keyword{manip}
8 man/daply.Rd
 @@ -2,9 +2,9 @@ \alias{daply} \title{Split data frame, apply function, and return results in an array.} \usage{ - daply(.data, .variables, .fun = NULL, ..., .progress = - "none", .drop_i = TRUE, .drop_o = TRUE, .parallel = - FALSE) + daply(.data, .variables, .fun = NULL, ..., + .progress = "none", .drop_i = TRUE, .drop_o = TRUE, + .parallel = FALSE) } \arguments{ \item{.fun}{function to apply to each piece} @@ -62,7 +62,7 @@ daply(baseball, .(year), function(df) mean(df[, 6:9])) \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \seealso{ Other array output: \code{\link{aaply}},
10 man/ddply.Rd
 @@ -2,8 +2,8 @@ \alias{ddply} \title{Split data frame, apply function, and return results in a data frame.} \usage{ - ddply(.data, .variables, .fun = NULL, ..., .progress = - "none", .drop = TRUE, .parallel = FALSE) + ddply(.data, .variables, .fun = NULL, ..., + .progress = "none", .drop = TRUE, .parallel = FALSE) } \arguments{ \item{.fun}{function to apply to each piece} @@ -53,17 +53,17 @@ ddply(baseball, .(year), "nrow") ddply(baseball, .(lg), c("nrow", "ncol")) rbi <- ddply(baseball, .(year), summarise, -mean_rbi = mean(rbi, na.rm = TRUE)) + mean_rbi = mean(rbi, na.rm = TRUE)) with(rbi, plot(year, mean_rbi, type="l")) base2 <- ddply(baseball, .(id), transform, -career_year = year - min(year) + 1 + career_year = year - min(year) + 1 ) } \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \seealso{ Other data frame input: \code{\link{daply}},
8 man/dlply.Rd
 @@ -2,8 +2,8 @@ \alias{dlply} \title{Split data frame, apply function, and return results in a list.} \usage{ - dlply(.data, .variables, .fun = NULL, ..., .progress = - "none", .drop = TRUE, .parallel = FALSE) + dlply(.data, .variables, .fun = NULL, ..., + .progress = "none", .drop = TRUE, .parallel = FALSE) } \arguments{ \item{.fun}{function to apply to each piece} @@ -44,7 +44,7 @@ } \examples{ linmod <- function(df) { -lm(rbi ~ year, data = mutate(df, year = year - min(year))) + lm(rbi ~ year, data = mutate(df, year = year - min(year))) } models <- dlply(baseball, .(id), linmod) models[[1]] @@ -57,7 +57,7 @@ hist(qual) \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \seealso{ Other data frame input: \code{\link{daply}},
4 man/eval.quoted.Rd
 @@ -2,8 +2,8 @@ \alias{eval.quoted} \title{Evaluate a quoted list of variables.} \usage{ - eval.quoted(exprs, envir = NULL, enclos = NULL, try = - FALSE) + eval.quoted(exprs, envir = NULL, enclos = NULL, + try = FALSE) } \arguments{ \item{expr}{quoted object to evalution}
3 man/get-split.Rd
 @@ -1,6 +1,9 @@ \name{[.split} \alias{[.split} \title{Subset splits.} +\usage{ + \method{[}{split} (x, i, ...) +} \arguments{ \item{x}{split object}
2 man/indexed_array.Rd
 @@ -1,5 +1,5 @@ \name{indexed_array} -\alias{"[[.indexed_array"} +\alias{[[.indexed_array} \alias{indexed_array} \alias{length.indexed_array} \alias{names.indexed_array}
4 man/join.Rd
 @@ -2,8 +2,8 @@ \alias{join} \title{Join two data frames together.} \usage{ - join(x, y, by = intersect(names(x), names(y)), type = - "left", match = "all") + join(x, y, by = intersect(names(x), names(y)), + type = "left", match = "all") } \arguments{ \item{x}{data frame}
6 man/l_ply.Rd
 @@ -2,8 +2,8 @@ \alias{l_ply} \title{Split list, apply function, and discard results.} \usage{ - l_ply(.data, .fun = NULL, ..., .progress = "none", .print - = FALSE) + l_ply(.data, .fun = NULL, ..., .progress = "none", + .print = FALSE) } \arguments{ \item{.data}{list to be processed} @@ -34,7 +34,7 @@ \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \keyword{manip}
6 man/laply.Rd
 @@ -2,8 +2,8 @@ \alias{laply} \title{Split list, apply function, and return results in an array.} \usage{ - laply(.data, .fun = NULL, ..., .progress = "none", .drop - = TRUE, .parallel = FALSE) + laply(.data, .fun = NULL, ..., .progress = "none", + .drop = TRUE, .parallel = FALSE) } \arguments{ \item{.fun}{function to apply to each piece} @@ -57,7 +57,7 @@ laply(seq_len(10), matrix, nrow = 2, ncol = 2) \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \seealso{ Other array output: \code{\link{aaply}},
4 man/ldply.Rd
 @@ -3,7 +3,7 @@ \title{Split list, apply function, and return results in a data frame.} \usage{ ldply(.data, .fun = NULL, ..., .progress = "none", - .parallel = FALSE) + .parallel = FALSE) } \arguments{ \item{.fun}{function to apply to each piece} @@ -45,7 +45,7 @@ \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \seealso{ Other data frame output: \code{\link{adply}},
14 man/liply.Rd
 @@ -21,13 +21,13 @@ } \examples{ if(require("iterators")) { -system.time(dlply(baseball, "id", summarise, mean_rbi = mean(rbi))) -system.time({ -baseball_id <- isplit2(baseball, baseball\$id) -liply(baseball_id, summarise, mean_rbi = mean(rbi, na.rm = TRUE)) -}) -# Iterators get used up: -liply(baseball_id, summarise, mean_rbi = mean(rbi, na.rm = TRUE)) + system.time(dlply(baseball, "id", summarise, mean_rbi = mean(rbi))) + system.time({ + baseball_id <- isplit2(baseball, baseball\$id) + liply(baseball_id, summarise, mean_rbi = mean(rbi, na.rm = TRUE)) + }) + # Iterators get used up: + liply(baseball_id, summarise, mean_rbi = mean(rbi, na.rm = TRUE)) } } \keyword{manip}
4 man/llply.Rd
 @@ -3,7 +3,7 @@ \title{Split list, apply function, and return results in a list.} \usage{ llply(.data, .fun = NULL, ..., .progress = "none", - .inform = FALSE, .parallel = FALSE) + .inform = FALSE, .parallel = FALSE) } \arguments{ \item{.fun}{function to apply to each piece} @@ -52,7 +52,7 @@ llply(x, quantile, probs = 1:3/4) \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \seealso{ Other list input: \code{\link{laply}},
6 man/m_ply.Rd
 @@ -2,8 +2,8 @@ \alias{m_ply} \title{Call function with arguments in array or data frame, discarding results.} \usage{ - m_ply(.data, .fun = NULL, ..., .expand = TRUE, .progress - = "none") + m_ply(.data, .fun = NULL, ..., .expand = TRUE, + .progress = "none") } \arguments{ \item{.data}{matrix or data frame to use as source of @@ -38,7 +38,7 @@ \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \keyword{manip}
6 man/maply.Rd
 @@ -2,8 +2,8 @@ \alias{maply} \title{Call function with arguments in array or data frame, returning an array.} \usage{ - maply(.data, .fun = NULL, ..., .expand = TRUE, .progress - = "none", .parallel = FALSE) + maply(.data, .fun = NULL, ..., .expand = TRUE, + .progress = "none", .parallel = FALSE) } \arguments{ \item{.data}{matrix or data frame to use as source of @@ -52,7 +52,7 @@ maply(cbind(1:5, 1:5), rnorm, n = 5) \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \keyword{manip}
6 man/mdply.Rd
 @@ -2,8 +2,8 @@ \alias{mdply} \title{Call function with arguments in array or data frame, returning a data frame.} \usage{ - mdply(.data, .fun = NULL, ..., .expand = TRUE, .progress - = "none", .parallel = FALSE) + mdply(.data, .fun = NULL, ..., .expand = TRUE, + .progress = "none", .parallel = FALSE) } \arguments{ \item{.data}{matrix or data frame to use as source of @@ -52,7 +52,7 @@ mdply(cbind(mean = 1:5, sd = 1:5), as.data.frame(rnorm), n = 5) \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \keyword{manip}
6 man/mlply.Rd
 @@ -2,8 +2,8 @@ \alias{mlply} \title{Call function with arguments in array or data frame, returning a list.} \usage{ - mlply(.data, .fun = NULL, ..., .expand = TRUE, .progress - = "none", .parallel = FALSE) + mlply(.data, .fun = NULL, ..., .expand = TRUE, + .progress = "none", .parallel = FALSE) } \arguments{ \item{.data}{matrix or data frame to use as source of @@ -53,7 +53,7 @@ mlply(cbind(1:4, by = 4:1), seq, to = 20) \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \keyword{manip}
6 man/ozone.Rd
 @@ -3,9 +3,6 @@ \alias{ozone} \title{Monthly ozone measurements over Central America.} \format{A 24 x 24 x 72 numeric array} -\usage{ - ozone -} \description{ This data set is a subset of the data from the 2006 ASA Data expo challenge, @@ -20,7 +17,7 @@ value <- ozone[1, 1, ] time <- 1:72 month.abbr <- c("Jan", "Feb", "Mar", "Apr", "May", -"Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec") + "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec") month <- factor(rep(month.abbr, length = 72), levels = month.abbr) year <- rep(1:6, each = 12) deseasf <- function(value) lm(value ~ month - 1) @@ -40,5 +37,6 @@ dim(deseas) \references{ \url{http://stat-computing.org/dataexpo/2006/} } +\keyword{dataset} \keyword{datasets}
3 man/progress_none.Rd
 @@ -1,6 +1,9 @@ \name{progress_none} \alias{progress_none} \title{Null progress bar} +\usage{ + progress_none() +} \description{ A progress bar that does nothing }
4 man/progress_tk.Rd
 @@ -2,8 +2,8 @@ \alias{progress_tk} \title{Graphical progress bar, powered by Tk.} \usage{ - progress_tk(title = "plyr progress", label = - "Working...", ...) + progress_tk(title = "plyr progress", + label = "Working...", ...) } \arguments{ \item{title}{window title}
2 man/r_ply.Rd
 @@ -30,7 +30,7 @@ r_ply(25, hist(runif(1000))) \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \keyword{manip}
2 man/raply.Rd
 @@ -48,7 +48,7 @@ hist(raply(1000, mean(rexp(1000)))) \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \keyword{manip}
2 man/rdply.Rd
 @@ -35,7 +35,7 @@ rdply(20, data.frame(x = runif(2))) \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \keyword{manip}
2 man/rlply.Rd
 @@ -34,7 +34,7 @@ hist(laply(mods, function(x) summary(x)\$r.squared)) \references{ Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, - 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. + 40(1), 1-29. \url{http://www.jstatsoft.org/v40/i01/}. } \keyword{manip}
4 man/split_labels.Rd
 @@ -2,8 +2,8 @@ \alias{split_labels} \title{Generate labels for split data frame.} \usage{ - split_labels(splits, drop, id = plyr::id(splits, drop = - TRUE)) + split_labels(splits, drop, + id = plyr::id(splits, drop = TRUE)) } \arguments{ \item{list}{of variables to split up by}
8 man/summarise.Rd
 @@ -19,11 +19,11 @@ } \examples{ summarise(baseball, -duration = max(year) - min(year), -nteams = length(unique(team))) + duration = max(year) - min(year), + nteams = length(unique(team))) ddply(baseball, "id", summarise, -duration = max(year) - min(year), -nteams = length(unique(team))) + duration = max(year) - min(year), + nteams = length(unique(team))) } \keyword{manip}
4 man/vaggregate.Rd
 @@ -2,8 +2,8 @@ \alias{vaggregate} \title{Vector aggregate.} \usage{ - vaggregate(.value, .group, .fun, ..., .default = NULL, .n - = nlevels(.group)) + vaggregate(.value, .group, .fun, ..., .default = NULL, + .n = nlevels(.group)) } \arguments{ \item{.value}{vector of values to aggregate}