reduce: Apply simple data reductions

View source: R/DataManagement.R

reduceR Documentation

Apply simple data reductions

Description

reduce reports the count of non-zero elements, sum and sum-of-squares for specified covariates in a Cyclops data object.

Usage

reduce(object, covariates, groupBy, power = 1)

Arguments

object

A Cyclops data object

covariates

Integer or string vector: list of covariates to report

groupBy

Integer or string (optional): generates a segmented reduction stratified by this covariate. Setting groupBy = "stratum" segments reduction for strataID

power

Integer: 0 = non-zero count, 1 = sum, 2 = sum-of-squares

Value

Specified reduction as number or data.frame if segmented.


Cyclops documentation built on Aug. 10, 2022, 5:08 p.m.