patientIDFromSample: A function for getting patient ID from biobank labels

Description Usage Arguments Value Examples

View source: R/stringmanipulation.R

Description

A function for getting patient ID from biobank labels

Usage

1
patientIDFromSample(sampleNames, asNum = TRUE)

Arguments

asNum

Should the results be return as integers, i.e. numeric. Defaults to TRUE

samplesName

One or more biobank labels. String pattern: XNNXNNNNNX, where X = letter, N = number, e.g. P28B00005E

Value

a vector with patient ids

Examples

1
2
3
4
sampleNames = c("P04A08417A", "P04A08417A_postfix", "prefix_P04A08417A_postfix")
patientIDFromSample(sampleNames)

returns: 8417, 8417, 8417

jacobfredsoee/LCEF documentation built on Feb. 7, 2021, 8:10 p.m.