Skip to contents

Check if an argument is a valid ID column.

Usage

check_id(x)

Arguments

x

Function argument that is being checked.

Value

If the argument is a valid ID column, it returns invisible TRUE. Otherwise, the function throws an error.

Examples

if (FALSE) { # \dontrun{
check_id(1:10)
check_id(as.character(1:10))
check_id(factor(1:10))
check_id(c(1, NA, 3))
check_id(c(1, 1, 2))
} # }