Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use base pipe in examples #1133

Closed
georgestagg opened this issue Jul 22, 2024 · 0 comments · Fixed by #1139
Closed

Use base pipe in examples #1133

georgestagg opened this issue Jul 22, 2024 · 0 comments · Fixed by #1139
Labels
tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day

Comments

@georgestagg
Copy link
Member

Update e.g.

purrr/R/keep.R

Lines 64 to 76 in d9ae235

#' Keep/discard elements based on their name/position
#'
#' @inheritParams map_at
#' @seealso [keep()]/[discard()] to keep/discard elements by value.
#' @export
#' @examples
#' x <- c(a = 1, b = 2, cat = 10, dog = 15, elephant = 5, e = 10)
#' x %>% keep_at(letters)
#' x %>% discard_at(letters)
#'
#' # Can also use a function
#' x %>% keep_at(~ nchar(.x) == 3)
#' x %>% discard_at(~ nchar(.x) == 3)

@hadley hadley added the tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day label Jul 22, 2024
cheryldietrich added a commit to cheryldietrich/purrr that referenced this issue Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants