Skip to content

Commit

Permalink
Correct documentation for pmap
Browse files Browse the repository at this point in the history
  • Loading branch information
SoyAndrea committed Aug 15, 2024
1 parent 72a4dcf commit 5fd340c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
20 changes: 19 additions & 1 deletion R/pmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,25 @@
#' * A formula, e.g. `~ ..1 + ..2 / ..3`. This syntax is not recommended as
#' you can only refer to arguments by position.
#' @inheritParams map
#' @inherit map return
#' @returns
#' The output length is determined by the length of the input.
#' The output names are determined by the names of the first element.
#' The output type is determined by the suffix:
#'
#' * No suffix: a list; `.f()` can return anything.
#'
#' * `_lgl()`, `_int()`, `_dbl()`, `_chr()` return a logical, integer, double,
#' or character vector respectively; `.f()` must return a compatible atomic
#' vector of length 1.
#'
#' * `_vec()` return an atomic or S3 vector, the same type that `.f` returns.
#' `.f` can return pretty much any type of vector, as long as its length 1.
#'
#' * `walk()` returns the input `.x` (invisibly). This makes it easy to
#' use in a pipe. The return value of `.f()` is ignored.
#'
#' Any errors thrown by `.f` will be wrapped in an error with class
#' [purrr_error_indexed].
#' @family map variants
#' @export
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion man/pmap.Rd

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

0 comments on commit 5fd340c

Please sign in to comment.