buildStats: IFC Statistics Coercion

View source: R/stats.R

buildStatsR Documentation

IFC Statistics Coercion

Description

Helper to build a list to allow statistics export.

Usage

buildStats(
  obj,
  stats = list(list(type = "COUNT", title = "Count", def = ""), list(type =
    "PERCENT_GATED", title = "%Gated", def = "")),
  width = 80 * (1 + length(stats)),
  height = 240,
  xlocation = 0,
  ylocation = 0,
  ...
)

Arguments

obj

an 'IFC_data' object

stats

list of statistics instructions, whose members are list containing 3 instructions:
- 'type' stats's type. Allowed are "COUNT","PERCENT_GATED","CONCENTRATION","PERCENT","MEAN","MEDIAN","STDDEV","MAD","CV","MINIMUM","MAXIMUM","GEOMETRIC_MEAN","MODE","VARIANCE","NAN","MEAN_RD","MEDIAN_RD".
- 'title' stats's title. If missing, it will be determined thanks to def.
- 'def' definition of the stats.
Default is:
list(list(type="COUNT",title="Count",def=""),
list(type="PERCENT_GATED",title="%Gated",def=""))

width

desired width. Default is 80 * (1 + length(stats)).

height

desired height Default is 400.

xlocation

x location in analysis workspace. Default is 0.

ylocation

y location in analysis workspace. Default is 0.

...

Other arguments to be passed.

Details

when stats$type is:
- "COUNT","PERCENT_GATED","CONCENTRATION", stats$def will be "",
- "PERCENT", stats$def has to be a population name,
- "MEAN_RD","MEDIAN_RD" stats$def has to be the concatenation of a feature name and a population name collapse with "|". e.g. "Area_MC|All",
- otherwise, stats$def has to be a feature name.

Value

an object of class 'IFC_stats'.


IFC documentation built on Sept. 14, 2023, 1:08 a.m.