Permalink
Browse files

Update documentation for R CMD check

  • Loading branch information...
1 parent d01b2ee commit 6c9d49891aa1c7dab3af3223c1e37d11a3d846ed @hadley committed Dec 12, 2008
Showing with 32 additions and 5 deletions.
  1. +1 −1 NEWS
  2. +3 −1 R/indexed-list.r
  3. +2 −1 man/ddply-5k.rd
  4. +2 −1 man/dlply-7t.rd
  5. +22 −0 man/indexed-list-55.rd
  6. +2 −1 man/splitter-d-cs.rd
View
2 NEWS
@@ -1,6 +1,6 @@
plyr 0.1.4 (2008-12-12) ---------------------------------------------------
- * Greatly improved speed (> 10x faster) for splitting data frames with many combinations
+ * Greatly improved speed (> 10x faster) and memory usage (50%) for splitting data frames with many combinations
* Splitting variables containing missing values now handled consistently
plyr 0.1.3 (2008-11-19) ---------------------------------------------------
View
4 R/indexed-list.r
@@ -7,6 +7,7 @@
# @alias length.indexed_list
# @alias names.indexed_list
# @alias as.list.indexed_list
+# @alias [[.indexed_list
indexed_list <- function(env, index) {
structure(
list(env = env, index = index),
@@ -15,13 +16,14 @@ indexed_list <- function(env, index) {
}
length.indexed_list <- function(x) length(x$index)
+
"[[.indexed_list" <- function(x, i) {
x$env$data[x$index[[i]], ]
}
names.indexed_list <- function(x) names(x$index)
-as.list.indexed_list <- function(x) {
+as.list.indexed_list <- function(x, ...) {
n <- length(x)
out <- vector("list", n)
for(i in seq_len(n)) {
View
3 man/ddply-5k.rd
@@ -6,13 +6,14 @@
\description{
For each subset of a data frame, apply function then combine results into a data frame
}
-\usage{ddply(.data, .variables, .fun = NULL, ..., .progress = "none")}
+\usage{ddply(.data, .variables, .fun = NULL, ..., .progress = "none", .drop = TRUE)}
\arguments{
\item{.data}{data frame to be processed}
\item{.variables}{variables to split data frame by, as quoted variables, a formula or character vector}
\item{.fun}{function to apply to each piece}
\item{...}{other arguments passed on to \code{.fun}}
\item{.progress}{name of the progress bar to use, see \code{\link{create_progress_bar}}}
+\item{.drop}{}
}
\value{a data frame}
\details{All plyr functions use the same split-apply-combine strategy: they split the
View
3 man/dlply-7t.rd
@@ -6,13 +6,14 @@
\description{
For each subset of a data frame, apply function then combine results into a list
}
-\usage{dlply(.data, .variables, .fun = NULL, ..., .progress = "none")}
+\usage{dlply(.data, .variables, .fun = NULL, ..., .progress = "none", .drop = TRUE)}
\arguments{
\item{.data}{data frame to be processed}
\item{.variables}{variables to split data frame by, as quoted variables, a formula or character vector}
\item{.fun}{function to apply to each piece}
\item{...}{other arguments passed on to \code{.fun}}
\item{.progress}{name of the progress bar to use, see \code{\link{create_progress_bar}}}
+\item{.drop}{}
}
\value{
\item{if results are atomic with same type and dimensionality, a vector, matrix or array; otherwise, a list-array (a list with dimensions)}
View
22 man/indexed-list-55.rd
@@ -0,0 +1,22 @@
+\name{indexed_list}
+\alias{indexed_list}
+\alias{length.indexed_list}
+\alias{names.indexed_list}
+\alias{as.list.indexed_list}
+\alias{[[.indexed_list}
+\title{An indexed list}
+\author{Hadley Wickham <h.wickham@gmail.com>}
+
+\description{
+Create a indexed list, a space efficient way of indexing into a large data frame
+}
+\usage{indexed_list(env, index)}
+\arguments{
+\item{env}{environment containing data frame}
+\item{index}{}
+}
+
+\details{}
+
+\examples{}
+
View
3 man/splitter-d-cs.rd
@@ -6,10 +6,11 @@
\description{
Split a data frame into pieces based on variable contained in that data frame
}
-\usage{splitter_d(data, .variables = NULL)}
+\usage{splitter_d(data, .variables = NULL, drop = TRUE)}
\arguments{
\item{data}{}
\item{.variables}{}
+\item{drop}{}
}
\value{a list of data.frames, with attributes that record split details}
\details{This is the workhorse of the \code{d*ply} functions. Based on the variables

0 comments on commit 6c9d498

Please sign in to comment.