SurvivalExperiment: Constructor for 'SurvivalExperiment' Class Builds a...

Description Usage Arguments Value Examples

View source: R/class-SurvivalExperiment.R

Description

Constructor for SurvivalExperiment Class

Builds a SurvivalExperiment object, which is just a wrapper for a SummarizedExperiment with mandatory survival metadata numeric columns survival_time and event_occurred.

Usage

1
2
3
4
5
SurvivalExperiment(
  ...,
  survival_time = "survival_time",
  event_occurred = "event_occurred"
)

Arguments

...

pairlist Fall through arguments to the SummarizedExperiment constructor. If the first argument to dots is a SummarizedExperiment, that object is used instead.

survival_time

A character vector indicating the column name in colData which contains the integer number of days a patient has survived since treatment at the time of data collection. If event_occurred is 1/TRUE, then this is the number of days the patient lived.

event_occurred

A character vector indicating the column name in colData which contains logical or integer values where 0/FALSE means a patient is alive and 1/TRUE means a patient is deceased.

Value

A SurvivalExperiment object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(sampleICGCmicro)

# build a SurvivalExperiment from raw data
ICGCmicro <- SurvivalExperiment(assays=assays(sampleICGCmicro),
  rowData=rowData(sampleICGCmicro), colData=colData(sampleICGCmicro),
  metadata=metadata(sampleICGCmicro), survival_time='survival_time',
  event_occurred='event_occurred')

# build a SurvivalExperiment from an existig SummarizedExperment
ICGCmicroSumExp <- as(sampleICGCmicro, 'SummarizedExperiment')
ICGCmicro <- SurvivalExperiment(ICGCmicroSumExp,
  survival_time='survival_time', event_occurred='event_occurred')

bhklab/PDATK documentation built on Dec. 27, 2021, 7:46 a.m.