add_var_id | R Documentation |
Add a variable id at first column in dataset
add_var_id(data, name = "id", overwrite = FALSE)
data |
A dataset |
name |
Name of new variable (as string) |
overwrite |
Can new id variable overwrite an existing variable in dataset? |
Data set containing new id variable
library(magrittr)
iris %>% add_var_id() %>% head()
iris %>% add_var_id(name = "iris_nr") %>% head()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.