# NOT RUN {
x <- c("First" = 1, "Second" = 2, "Last" = 3)
keep_at(x, "Second")
keep_at(x, Second)
keep_at(x, 2)
keep_at(x, starts_with("Sec"))
#> Second
#> 2
keep_at(x, ends_with("t"))
#> First Last
#> 1 3
x <- c(1, 2, 3)
discard_at(x, 1)
#> Second Last
#> 2 3
# }
Run the code above in your browser using DataLab