Learn R Programming

mSigTools (version 1.0.7)

write_exposure: Write an exposure matrix to a file.

Description

Write an exposure matrix to a file.

Usage

write_exposure(exposure, file, row.names = TRUE)

Value

No return value, called for side effects.

Arguments

exposure

Exposures as a numerical matrix (or data.frame) with signatures in rows and samples in columns. Rownames are taken as the signature names and column names are taken as the sample IDs.

file

File to which to write the exposure matrix (as a CSV file).

row.names

Either a logical value indicating whether the row names of exposure are to be written along with exposure, or a character vector of row names to be written.

Examples

Run this code
file <- system.file("extdata",
  "Liver-HCC.exposure.csv",
  package = "mSigTools"
)
exposure <- read_exposure(file)
write_exposure(exposure, file = file.path(tempdir(), "Liver-HCC.exposure.csv"))

Run the code above in your browser using DataLab