Skip to content

Commit

Permalink
Merge pull request hadley#205 from krlmlr/124-rowwise-docs
Browse files Browse the repository at this point in the history
add docs to show how to apply a function rowwise
  • Loading branch information
hadley committed Mar 30, 2015
2 parents ad1ccfd + c51954a commit 963b802
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 2 deletions.
4 changes: 3 additions & 1 deletion R/d_ply.r
@@ -1,6 +1,8 @@
#' Split data frame, apply function, and discard results.
#'
#' For each subset of a data frame, apply function and discard results
#' For each subset of a data frame, apply function and discard results.
#' To apply a function for each row, use \code{\link{a_ply}} with
#' \code{.margins} set to \code{1}.
#'
#' @template ply
#' @template d-
Expand Down
2 changes: 2 additions & 0 deletions R/daply.r
Expand Up @@ -3,6 +3,8 @@
#' For each subset of data frame, apply function then combine results into
#' an array. \code{daply} with a function that operates column-wise is
#' similar to \code{\link{aggregate}}.
#' To apply a function for each row, use \code{\link{aaply}} with
#' \code{.margins} set to \code{1}.
#'
#' @template ply
#' @section Input: This function splits data frames by variables.
Expand Down
2 changes: 2 additions & 0 deletions R/ddply.r
Expand Up @@ -2,6 +2,8 @@
#'
#' For each subset of a data frame, apply function then combine results into a
#' data frame.
#' To apply a function for each row, use \code{\link{adply}} with
#' \code{.margins} set to \code{1}.
#'
#' @template ply
#' @template d-
Expand Down
2 changes: 2 additions & 0 deletions R/dlply.r
Expand Up @@ -3,6 +3,8 @@
#' For each subset of a data frame, apply function then combine results into a
#' list. \code{dlply} is similar to \code{\link{by}} except that the results
#' are returned in a different format.
#' To apply a function for each row, use \code{\link{alply}} with
#' \code{.margins} set to \code{1}.
#'
#' @template ply
#' @template d-
Expand Down
4 changes: 3 additions & 1 deletion man/d_ply.Rd
Expand Up @@ -44,7 +44,9 @@ environment set up for computing.}
Nothing
}
\description{
For each subset of a data frame, apply function and discard results
For each subset of a data frame, apply function and discard results.
To apply a function for each row, use \code{\link{a_ply}} with
\code{.margins} set to \code{1}.
}
\section{Input}{
This function splits data frames by variables.
Expand Down
2 changes: 2 additions & 0 deletions man/daply.Rd
Expand Up @@ -50,6 +50,8 @@ if results are atomic with same type and dimensionality, a
For each subset of data frame, apply function then combine results into
an array. \code{daply} with a function that operates column-wise is
similar to \code{\link{aggregate}}.
To apply a function for each row, use \code{\link{aaply}} with
\code{.margins} set to \code{1}.
}
\section{Input}{
This function splits data frames by variables.
Expand Down
2 changes: 2 additions & 0 deletions man/ddply.Rd
Expand Up @@ -43,6 +43,8 @@ A data frame, as described in the output section.
\description{
For each subset of a data frame, apply function then combine results into a
data frame.
To apply a function for each row, use \code{\link{adply}} with
\code{.margins} set to \code{1}.
}
\section{Input}{
This function splits data frames by variables.
Expand Down
2 changes: 2 additions & 0 deletions man/dlply.Rd
Expand Up @@ -44,6 +44,8 @@ list of results
For each subset of a data frame, apply function then combine results into a
list. \code{dlply} is similar to \code{\link{by}} except that the results
are returned in a different format.
To apply a function for each row, use \code{\link{alply}} with
\code{.margins} set to \code{1}.
}
\section{Input}{
This function splits data frames by variables.
Expand Down

0 comments on commit 963b802

Please sign in to comment.