castSE: castSE

View source: R/castSE.R

castSER Documentation

castSE

Description

Casts a data.frame as a SummarizedExperiment-class

Usage

castSE(
  x,
  rowNames = NULL,
  colNames = NULL,
  assayNames = NULL,
  colData = NULL,
  rowData = NULL,
  sparse = FALSE
)

Arguments

x

A data.frame

rowNames

Column of 'x' containing the row.names (if omitted, will build from 'rowData')

colNames

Column of 'x' containing the column names (if omitted, will build from 'colData')

assayNames

Columns of 'x' to turn into assays

colData

Columns of 'x' to use as colData

rowData

Columns of 'x' to use as rowData

sparse

Local, whether to keep the assays sparse.

Value

A SummarizedExperiment-class

Examples

d <- data.frame(transcript=rep(LETTERS[1:10],each=2), gene=rep(LETTERS[1:5],each=4),
                count=rpois(20, 10), sample=letters[1:2])
head(d)
castSE(d, rowData=c("transcript","gene"), colNames="sample")

plger/SEtools documentation built on Dec. 2, 2022, 3:58 p.m.