write.perseus: write.perseus: function to generate a perseus-readable text...

View source: R/io.R

write.perseusR Documentation

write.perseus: function to generate a perseus-readable text document

Description

Write data to a perseus text file or connection

Write Data to file in the custom Perseus matrix file format.

Usage

write.perseus(object = NULL, con = NULL, ...)

## Default S3 method:
write.perseus(object = NULL, con = NULL, main,
  annotCols = NULL, annotRows = NULL, descr = NULL,
  imputeData = NULL, qualityData = NULL, ...)

## S3 method for class 'matrixData'
write.perseus(object, con, ...)

## S3 method for class 'list'
write.perseus(object, con, ...)

## S3 method for class 'data.frame'
write.perseus(object, con, annotCols = NULL, ...)

## S3 method for class 'matrix'
write.perseus(object, con, annotCols = NULL, ...)

## S3 method for class 'ExpressionSet'
write.perseus(object, con, ...)

Arguments

object

an expressionSet, matrixData, list or table-like object.

con

A connection object or the path to output file

...

additional arguments passed to other functions

main

a data frame containing

annotCols

a df containing columns containing metadata (about the rows)

annotRows

a df containing columns containing metadata (about the columns)

descr

a character vector that describes the columns in main and in annotCols (in that order)

imputeData

a df containing imputations – True or False of main data frame

qualityData

a df containing quality values of main data frame

Value

writes to disk a perseus-interpretable text representation of an R object

NULL

NULL

NULL

NULL

NULL

See Also

read.perseus matrixData

Examples

df <- matrixData(
main=data.frame(a=1:3, b=6:8),
annotCols=data.frame(b=c('a','b','c')),
annotRows=data.frame(x=factor(c('1','1'))),
description=c('a','a','b'))
con <- textConnection('df1', 'w')
write.perseus(df, con)
close(con)

jdrudolph/PerseusR documentation built on Sept. 10, 2022, 3:27 p.m.