Description Usage Arguments Value Examples
View source: R/isColsUniqueIdentifier.R
Indicates if given fields allow for unique identification of rows i.e. if they can be teated as keys of the data.table.
1 | isColsUniqueIdentifier(dt_data, v_s_cols = NULL)
|
dt_data |
a data.table. |
v_s_cols |
a character vector of column names in dt_data which we expect allow for unique idenfication. |
A boolean of whether values in v_s_keys allow for unique idenfication of rows in dt_data.
1 2 3 4 | library(data.table)
dt_data <- data.table(var1 = c(1,1,2,2) , var2 = c("a", "b" , "a","b") )
isColsUniqueIdentifier(dt_data, v_s_cols = "var1")
isColsUniqueIdentifier(dt_data, v_s_cols = c("var1", "var2"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.