Learn R Programming

DescrTab2 (version 2.1.16)

guess_ID_variable: Make an educated guess about the name of the ID variable from a dataset

Description

Make an educated guess about the name of the ID variable from a dataset

Usage

guess_ID_variable(dat, suppressWarnings = FALSE)

Value

if exactly one possible

Arguments

dat

a dataset with names (list, data.frame, tibble)

suppressWarnings

(logical) suppress warning messages if you know what you are dooing

Examples

Run this code
dat <- data.frame(ID = c(1,2,3,4,5),
                 other = c(1,2,3,4,5))
guess_ID_variable(dat)

Run the code above in your browser using DataLab