summary.eav_covariates: Provides a summary table of sample covariates.

View source: R/sample-covariates.R

summary.eav_covariatesR Documentation

Provides a summary table of sample covariates.

Description

Sumamrizes a set of sample covariates (returned from fetch_sample_covariates() at different granulaities.

Usage

## S3 method for class 'eav_covariates'
summary(object, ..., expanded = FALSE, droplevels = TRUE)

Arguments

object

A sample covariate table, the likes returned from fetch_sample_covariates().

expanded

includes details (rows) for each covariate per level (or quantile), depending on the covariates "class" attribute.

Value

a tibble of summary sample covariate information with the following columns:

  • variable: name of the variable

  • class: class of variable (real, categorical)

  • nsamples: the number of samples that have this variable defined

  • level: the level (or quantile) of the covariate (included only when expanded == TRUE)

  • ninlevel: the number of samples with this covariate value (included only when expanded == TRUE)

Examples

fds <- exampleFacileDataSet()
covs <- fetch_sample_covariates(fds)
smry <- summary(covs)
details <- summary(covs, expanded = TRUE)
catdeetz <- covs |>
  filter(class == "categorical") |>
  summary(expanded = TRUE)

facilebio/FacileData documentation built on Feb. 23, 2024, 9:14 a.m.