extract_cohort: Create cohort from patient files

View source: R/misc_functions.R

extract_cohortR Documentation

Create cohort from patient files

Description

Create cohort from patient files

Usage

extract_cohort(filepath, patids = NULL, select = NULL, set = FALSE)

Arguments

filepath

Path to directory containing .txt files.

patids

Patids of patients to retain in the cohort. Character vector. Numeric values should not be used.

select

Character vector of column names to select.

set

If TRUE will create a variable called set which will contain the number that comes after the word 'set' in the file name.

Value

Data frame with patient information

Examples


## Extract cohort data
pat<-extract_cohort(filepath = system.file("aurum_data", package = "rcprd"))
pat


rcprd documentation built on April 12, 2025, 1:57 a.m.