PomaCreateObject: Create a 'SummarizedExperiment' Object

View source: R/PomaCreateObject.R

PomaCreateObjectR Documentation

Create a SummarizedExperiment Object

Description

PomaCreateObject creates a SummarizedExperiment object from data frames.

Usage

PomaCreateObject(metadata = NULL, features = NULL, factor_levels = 10)

Arguments

metadata

Metadata variables structured in columns. Sample ID must be the first column.

features

Matrix of features. Each feature is a column.

factor_levels

Numeric. Integer variables with more levels than indicated by this parameter will be treated as factors.

Value

A SummarizedExperiment object.

Author(s)

Pol Castellano-Escuder

References

Morgan M, Obenchain V, Hester J, Pagès H (2021). SummarizedExperiment: SummarizedExperiment container. R package version 1.24.0, https://bioconductor.org/packages/SummarizedExperiment.

Examples

data(iris)

# Create metadata: Data frame with sample names and a group factor
metadata <- data.frame(ID = 1:150, Group = iris$Species)

# Create features: `p` column data frame with features
features <- iris[, 1:4]

# Create a `SummarizedExperiment` object with `POMA`
object <- PomaCreateObject(metadata = metadata, features = features)

pcastellanoescuder/POMA documentation built on March 15, 2024, 10:08 p.m.