Adds scale * (numerator + pseudocount) / (denominator + pseudocount),
optionally on a logarithmic scale. Zero numerators give -Inf on a log
scale; builders such as PlotBandProfiles() draw them at a floor.
Usage
PlotDataRatio(
data,
numerator,
denominator,
pseudocount = 0,
log_base = NULL,
scale = 1,
into = "ratio"
)See also
Other plot-data builders:
PlotDataBindRows(),
PlotDataConstant(),
PlotDataCount(),
PlotDataCrossShares(),
PlotDataDirection(),
PlotDataDominant(),
PlotDataFromArrays(),
PlotDataJoin(),
PlotDataKeyColours(),
PlotDataLabels(),
PlotDataLonger(),
PlotDataMembership(),
PlotDataPairRatio(),
PlotDataProduct(),
PlotDataQuantiles(),
PlotDataRankRows(),
PlotDataRecode(),
PlotDataRelative(),
PlotDataSelect(),
PlotDataShares(),
PlotDataSummarise(),
PlotDataUnite()
Examples
PlotDataRatio(data.frame(a = c(1, 0, 4), b = 2), "a", "b", log_base = 2)
#> a b ratio
#> 1 1 2 -1
#> 2 0 2 -Inf
#> 3 4 2 1