Description Usage Arguments Details Value Author(s) Examples
Data.frames are subsetted using a vector of patients.
1 | extractPatients(ds, px)
|
ds |
Parent data.frame to extract patient subset from. |
px |
Vector of patient identifiers to extract from the dataset. |
This function extracts a subset of patient data from a larger dataset. It
assumes the first column of the data.frame ds
contains alphanumeric
subject identifications (SID
) to be filtered; this column will be
renamed "SID" as a result of this function if it is not already.
A subset of the data.frame ds will be returned with only the patients listed in the px vector. The first column will be renamed "SID" as a result of this function.
Samuel Callisto calli055@umn.edu extractPatients()
1 2 3 4 | dataset <- data.frame(c(1:20), LETTERS[1:20], letters[1:20])
names(dataset) <- c("SID", "cov1", "cov2")
output <- extractPatients(dataset, 4:8)
output
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.