as.EAVtable: Convert a 'pData' data.frame to a melted EAV table

View source: R/entity-attribute-value.R

as.EAVtableR Documentation

Convert a pData data.frame to a melted EAV table

Description

Transforms a wide pData data.frame into a melted EAV table for use in a FacileDataSet. This function will also produce the list-of-list encodings that are generated from eav_metadata_create() to do its thing as an attribute of the returned object.

Usage

as.EAVtable(
  x,
  ignore = c("dataset", "sample_id"),
  covariate_def = list(),
  na.rm = TRUE
)

Arguments

x

a wide pData data.frame

covariate_def

passed to eav_metadata_create() that is used to override default covariate definitions extracted from the columns of x

Details

If you want to provide custom definitions for the covariates in the EAVtable that are different than the ones generated in eav_metadata_create(), then provie that definition list in the covariate_def parameter.

Value

a melted EAV table from x


facileverse/FacileData documentation built on Feb. 24, 2024, 7:59 a.m.