Skip to content

Commit

Permalink
Work on docs, inspired by conversations around row-oriented work (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc authored and hadley committed May 9, 2018
1 parent d0a8081 commit fda4bbe
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion R/as_mapper.R
Expand Up @@ -5,7 +5,7 @@
#' generic. The default method forwards its arguments to
#' [rlang::as_function()].
#'
#' @param .f A function, formula, or atomic vector.
#' @param .f A function, formula, or vector (not necessarily atomic).
#'
#' If a __function__, it is used as is.
#'
Expand Down
12 changes: 7 additions & 5 deletions R/map2-pmap.R
@@ -1,20 +1,22 @@
#' Map over multiple inputs simultaneously.
#'
#' These functions are variants of `map()` that iterate over multiple arguments
#' These functions are variants of [map()] that iterate over multiple arguments
#' simultaneously. They are parallel in the sense that each input is processed
#' in parallel with the others, not in the sense of multicore computing. They
#' share the same notion of "parallel" as [base::pmax()] and [base::pmin()].
#' `map2()` and `walk2()` are specialised for the two argument case; `pmap()`
#' and `pwalk()` allow you to provide any number of arguments in a list.
#' and `pwalk()` allow you to provide any number of arguments in a list. Note
#' that a data frame is a very important special case, in which case `pmap()`
#' and `pwalk()` apply the function `.f` to each row.
#'
#' Note that arguments to be vectorised over come before the `.f`,
#' Note that arguments to be vectorised over come before `.f`,
#' and arguments that are supplied to every call come after `.f`.
#'
#' @inheritParams map
#' @param .x,.y Vectors of the same length. A vector of length 1 will
#' be recycled.
#' @param .l A list of lists. The length of `.l` determines the
#' number of arguments that `.f` will be called with. List
#' @param .l A list of vectors, such as a data frame. The length of `.l`
#' determines the number of arguments that `.f` will be called with. List
#' names will be used if present.
#' @return An atomic vector, list, or data frame, depending on the suffix.
#' Atomic vectors and lists will be named if `.x` or the first
Expand Down
2 changes: 1 addition & 1 deletion man/as_mapper.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/detect.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/imap.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/map.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions man/map2.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/modify.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/safely.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fda4bbe

Please sign in to comment.