aggregate_metadata {ISAnalytics}R Documentation

Performs aggregation on metadata contained in the association file.

Description

[Maturing] Groups metadata by the specified grouping keys and returns a summary of info for each group. For more details on how to use this function: vignette("Working with aggregate functions", package = "ISAnalytics")

Usage

aggregate_metadata(
  association_file,
  grouping_keys = c("SubjectID", "CellMarker", "Tissue", "TimePoint"),
  aggregating_functions = default_meta_agg(),
  import_stats = lifecycle::deprecated()
)

Arguments

association_file

The imported association file (via linkimport_association_file)

grouping_keys

A character vector of column names to form a group

aggregating_functions

A data frame containing specifications of the functions to be applied to columns in the association file during aggregation. It defaults to default_meta_agg. The structure of this data frame should be maintained if the user wishes to change the defaults.

import_stats

[Deprecated] The import of VISPA2 stats has been moved to its dedicated function, see import_Vispa2_stats.

Value

An aggregated data frame

See Also

Other Aggregate functions: aggregate_values_by_key(), default_meta_agg()

Examples

op <- options("ISAnalytics.widgets" = FALSE, "ISAnalytics.verbose" = FALSE)
path_AF <- system.file("extdata", "ex_association_file.tsv",
    package = "ISAnalytics"
)
root_correct <- system.file("extdata", "fs.zip", package = "ISAnalytics")
root_correct <- unzip_file_system(root_correct, "fs")
association_file <- import_association_file(path_AF, root_correct,
    dates_format = "dmy"
)
aggregated_meta <- aggregate_metadata(association_file)
options(op)

[Package ISAnalytics version 1.2.1 Index]