Make an educated guess about the name of the ID variable from a dataset
Source:R/loadData.R
guess_ID_variable.Rd
Make an educated guess about the name of the ID variable from a dataset
Arguments
- dat
a dataset with names (
list
,data.frame
,tibble
)- suppressWarnings
(logical) suppress warning messages if you know what you are dooing
Examples
dat <- data.frame(ID = c(1,2,3,4,5),
other = c(1,2,3,4,5))
guess_ID_variable(dat)
#> Warning: One possible candidate for an ID variable found: ID. This variable is used as ID.
#> [1] "ID"