fcdr_breadth_score: Calculate A Breadth Score

Description Usage Arguments Value Examples

View source: R/fc_dim_red.R

Description

Replace a subset of features with a single score representing the geometric mean for each subject across those features. Do NOT pass standardized data.

Usage

1
fcdr_breadth_score(fc, to_condense, name = NULL)

Arguments

fc

The Fc Array data frame.

to_condense

A vector of strings of features that you want to collapse into a single score.

name

An optional name parameter to specify for the new score feature. Otherwise, the members of to_condense will be presumed to be of a similar class, and the first substring of the first feature (when split by [.]) will be prepended to "_score".

Value

The Fc Array data frame, with the features provided replaced with a single score.

Examples

1
2
3
4
# pass only the colnames that contain IgG3
fc_new = fcdr_breath_score(fc, colnames(fc)[grepl("IgG3", colnames(fc), fixed=TRUE)])
# contains the new score feature
fc_new[,"IgG3_score"]

kmorrisongr/fcan documentation built on Sept. 9, 2020, 10:12 a.m.