assignValuePerSubject: Assign average sample values to their corresponding subjects

Description Usage Arguments Value See Also Examples

View source: R/analysis.R

Description

Assign average sample values to their corresponding subjects

Usage

1
2
3
4
5
6
7
assignValuePerSubject(
  data,
  match,
  clinical = NULL,
  patients = NULL,
  samples = NULL
)

Arguments

data

One-row data frame/matrix or vector: values per sample for a single gene

match

Matrix: match between samples and subjects

clinical

Data frame or matrix: clinical dataset (only required if the subjects argument is not handed)

patients

Character: subject identifiers (only required if the clinical argument is not handed)

samples

Character: samples to use when assigning values per subject (if NULL, all samples will be used)

Value

Values per subject

See Also

Other functions to analyse survival: getAttributesTime(), labelBasedOnCutoff(), optimalSurvivalCutoff(), plotSurvivalCurves(), plotSurvivalPvaluesByCutoff(), processSurvTerms(), survdiffTerms(), survfit.survTerms(), testSurvival()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Calculate PSI for skipped exon (SE) and mutually exclusive (MXE) events
annot <- readFile("ex_splicing_annotation.RDS")
junctionQuant <- readFile("ex_junctionQuant.RDS")

psi <- quantifySplicing(annot, junctionQuant, eventType=c("SE", "MXE"))

# Match between subjects and samples
match <- rep(paste("Subject", 1:3), 2)
names(match) <- colnames(psi)

# Assign PSI values to each subject based on the PSI of their samples
assignValuePerSubject(psi[3, ], match)

psichomics documentation built on Nov. 8, 2020, 5:44 p.m.