Learn R Programming

tidytidbits (version 0.3.3)

with_name: Slice by name

Description

Slices of a vector with elements of given name, or containing given patterns. Analogous accessor functions for pluck

Usage

with_name(v, name)

with_name_containing(v, pattern)

named(name)

name_contains(pattern)

Value

A slice from v containing all elements in v with the given name, or the name of which contains pattern

Arguments

v

A vector

name

Name of entry to pluck

pattern

Pattern passed to str_detect