str_subset_keep_names: str_subset that preserves names

Description Usage Arguments Examples

View source: R/tools.R

Description

str_subset that preserves names

Usage

1
str_subset_keep_names(vec, pattern)

Arguments

vec

named vector

pattern

regex as in str_subset

Examples

1
2
myvec <- c("a", "b", "ab", "ba") %>% are_names_of(.,.)
myvec %>% str_subset_keep_names("^a")

dlill/conveniencefunctions documentation built on Oct. 10, 2018, 12:19 p.m.