View source: R/str2str_functions.R
| sn | R Documentation |
sn sets a vector's names as its elements. It is a simple utility function
equal to setNames(x, nm = as.character(x)). This is particularly useful
when using lapply and you want the return object to have X as its names.
sn(x)
x |
atomic or list vector. |
x with the elements of x as its names.
sn(1:10)
sn(c("one","two","three"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.