Skip to contents

Quickly attanch phecode descriptions to a data.table

Usage

phe_desc(
  x,
  phe_col = "phecode",
  simplify = FALSE,
  group = TRUE,
  keep_old = NULL
)

Arguments

x

a data.table with phecodes to merge in descriptions and other metadata

phe_col

name of column in `x` that contains phecodes

simplify

if TRUE, only return `phe_col` and `description` columns

group

if TRUE, return `group` column

keep_old

if not NULL, keep additional columns from `x`

Value

data.table with phecode descriptions

Examples

if (FALSE) { # \dontrun{
phecode_sub <- ms::pheinfo[1:10, .(phecode)]
phe_desc(phecode_sub)
} # }