Description Usage Arguments Details Examples
Replaced matched patterns in names
1 | nm_replace(x, pattern, replacement)
|
x |
object with names |
pattern |
pattern to match |
replacement |
replacement vector |
nm_replace
is like str_replace
but operates on the names
attribute
of x
rather than a user-supplied string.
1 2 3 4 | v <- c( aa=1, ab=2, ac=3 )
v
v %>% nm_replace( "^a", "b" )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.