View source: R/Microclusters.R
poolMetaData | R Documentation |
Used to pool a meta-data data.frame which may contain a mixture of numeric and factor variables
poolMetaData(metaData, pools)
metaData |
data.frame of meta-data for cells |
pools |
named list of character vector describing cell ids in each pool |
For numerical variables, the pooled value is just the average of the value for cells in the pool
For factors, the pooled factor value represents the majority level across cells in the pool. If there is no simple majority (e.g. no factor level > 50%), then the level '~' is substituted.
Additionally, for factor variables, a new variable of the form
<Variable>_<Level>
is created for each level in the factor with a value
equal to the proportion of cells in the pool with that factor level.
A data.frame of pooled meta-data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.