Skip to content

Commit

Permalink
More polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Aug 21, 2024
1 parent 306727c commit 88bdb6c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
15 changes: 4 additions & 11 deletions R/superseded-map-df.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,12 @@
#' map_dfr(df, trimws)
#' map_dfc(df, trimws)
#'
#' # If you want to apply a function to each column of a data frame
#' # you might instead want to use modify:
#' modify(df, trimws)
#'
#' # list_rbind()/list_cbind() don't work here because they require
#' # data frame inputs
#' # But list_rbind()/list_cbind() fail because they require data frame inputs
#' try(map(df, trimws) |> list_rbind())
#'
#' # Instead, use modify() to apply a function to each column of a data frame
#' modify(df, trimws)
#'
#' # map2 ---------------------------------------------
#'
#' ex_fun <- function(arg1, arg2){
Expand All @@ -78,11 +76,6 @@
#' map2_dfc(arg1, arg2, ex_fun)
#' # now
#' map2(arg1, arg2, ex_fun) |> list_cbind()
#'




map_dfr <- function(.x, .f, ..., .id = NULL) {
# in 1.0.0
lifecycle::signal_stage("superseded", "map_dfr()", I("`map()` + `list_rbind()`"))
Expand Down
11 changes: 4 additions & 7 deletions man/map_dfr.Rd

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

0 comments on commit 88bdb6c

Please sign in to comment.