Learn R Programming

ggHoriPlot (version 1.0.1)

compute_ori_sca: Compute the origin and scale of the horizon plot

Description

Compute the origin and scale of the horizon plot

Usage

compute_ori_sca(data, origin, horizonscale)

Value

A list with two elements: ori, which represents the numeric origin of the horizon plot, and vec_cut, which is a vector with the cutpoints for the horizon plot.

Arguments

data

A data frame.

origin

Origin of the horizon plot. It can either be a string, namely "midpoint" (the default), "median", "mean", "min" or "quantiles", or a user-specified number.

horizonscale

Cutpoints of the horizon plot. It can either be an integer specifying the number of ranges (default is 6), or a user-supplied numeric vector with the cutpoints defining the different ranges.