View source: R/id_across_datasets.R
id_across_datasets | R Documentation |
Create an ID column in each of the data sets. The ID values will span across the data sets.
id_across_datasets( dt_list = NULL, id_col_name = "id", id_col_position = "first", silent = FALSE )
dt_list |
a list of data.table objects |
id_col_name |
name of the column that will contain ID values.
By default, |
id_col_position |
position of the newly created ID column.
If |
silent |
If |
the output will be a list of data.table objects.
# running the examples below requires importing the data.table package. prep(data.table) id_across_datasets( dt_list = list(setDT(copy(mtcars)), setDT(copy(iris)))) id_across_datasets( dt_list = list(setDT(copy(mtcars)), setDT(copy(iris)), setDT(copy(women))), id_col_name = "newly_created_id_col", id_col_position = "last")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.