extractPatients: Extract Patients

Description Usage Arguments Details Value Author(s) Examples

Description

Data.frames are subsetted using a vector of patients.

Usage

1

Arguments

ds

Parent data.frame to extract patient subset from.

px

Vector of patient identifiers to extract from the dataset.

Details

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.

Value

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.

Author(s)

Samuel Callisto calli055@umn.edu extractPatients()

Examples

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

callistosp/dataTools documentation built on May 3, 2019, 4:31 p.m.