id: Add id variables to data frame

Description Usage Arguments Value

View source: R/id.R

Description

Construct id variable for patient data.

Usage

1
id(x, id = c("persnr", "pnr", "pat_id", "pn", "id"), ignore.case = TRUE)

Arguments

x

data frame

id

names of a possible id variable found in x

ignore.case

should name matching be done regardless of character case?

Value

Character variable with either the first name from id found in x or rownames(x) if no named column found.


incadata documentation built on April 14, 2020, 6:08 p.m.