Skip to contents

Provides a lightweight front door for external packages holding data in memory (lists, arrays, data.frames) to construct a validated GDS without going through on-disk adapters.

Usage

as_gds(x, ...)

# S3 method for class 'list'
as_gds(
  x,
  space = NULL,
  subjects = NULL,
  contrasts = NULL,
  col_data = NULL,
  row_data = NULL,
  metadata = list(),
  ...
)

# S3 method for class 'array'
as_gds(
  x,
  space = NULL,
  subjects = NULL,
  contrasts = NULL,
  assay_name = "beta",
  col_data = NULL,
  row_data = NULL,
  metadata = list(),
  ...
)

# S3 method for class 'data.frame'
as_gds(
  x,
  mapping = NULL,
  space = NULL,
  col_data = NULL,
  row_data = NULL,
  contrast_data = NULL,
  metadata = list(),
  ...
)

# S3 method for class 'nftab'
as_gds(x, feature = NULL, ...)

Arguments

x

Object to coerce (list/array/data.frame)

...

Additional arguments passed to methods

space

Optional space for sample axis; defaults to sample labels from data

subjects

Optional subject identifiers

contrasts

Optional contrast identifiers

col_data

Optional subject-level covariates

row_data

Optional sample-level metadata

metadata

Optional metadata list merged into gds_metadata()

assay_name

Name to use for the single-array input (default: "beta")

mapping

Optional list mapping column names for axes and assays. Default: list(sample="sample", subject="subject", contrast="contrast", assays=list(beta="beta", var="var"), contrast_data=NULL)

contrast_data

Optional contrast-level metadata. When omitted, mapping$contrast_data can name one or more long-table columns to collapse onto the contrast axis.

feature

Name of the neurotabs feature to use as the primary assay

Value

A gds object