col_id {madshapR} | R Documentation |
Return the id column names(s) of a dataset
Description
Return the id column names(s) of a dataset if any. If not, the function returns a NULL object.
Usage
col_id(dataset)
Arguments
dataset |
A data frame object. |
Details
A dataset is a data table containing variables. A dataset object is a data frame and can be associated with a data dictionary. If no data dictionary is provided with a dataset, a minimum workable data dictionary will be generated as needed within relevant functions. Identifier variable(s) for indexing can be specified by the user. The id values must be non-missing and will be used in functions that require it. If no identifier variable is specified, indexing is handled automatically by the function.
Value
Name(s) of identifier column(s). NULL if not.
Examples
{
col_id(iris)
library(fabR)
iris <- add_index(iris)
iris <- as_dataset(iris, col_id = 'index')
col_id(iris)
}
[Package madshapR version 1.1.0 Index]