read_km_folder: Read many digitized Kaplan-Meier curves

Description Usage Arguments Details Value

View source: R/read_km_folder.R

Description

The function reads a collection of files containing data from digitized Kaplan-Meier curves.

Usage

1
2
3
4
5
6
7
8
9
read_km_folder(
  path,
  preferred_baseline = NULL,
  filter = "KM.txt",
  split = "_",
  study = 1,
  outcome = 2,
  treatment = 3
)

Arguments

path

path to a folder containing txt files from digitizing; each text file (corresponding to a Kaplan-Meier curve) should have 3 columns, in the following order: time, number at risk, number of events. Names of columns do not matter.

preferred_baseline

character; if you want to specify a preferred baseline treatment

filter

character; only files containing filter in title will be used

split

character; sign that separates study, outcome and treatment

study

integer explaining naming convention, see below

outcome

integer explaining naming convention, see below

treatment

integer explaining naming convention, see below

Details

By default we assume that the files will follow naming convention such as study_outcome_trt_KM.txt, e.g. MOT_OS_Pazo_KM.txt. If the naming scheme is different, user can reorder at will or change the separation sign, e.g. for OS-Pazo-MOT-KM.txt we would say split = "-", study = 3, outcome = 1, treatment = 2.

Value

Data frame which can be used as input into NMA models using survnma.


certara/survivalnma documentation built on Oct. 17, 2020, 12:34 a.m.