SurvivalExperiment {PDATK}R Documentation

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.

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

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

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')


[Package PDATK version 1.0.2 Index]