expand_value_to_points {DEXiR} | R Documentation |
expand_value_to_points
Description
Expand a DEXi value
to a sequence of individual elements (points).
Particularly aimed for graphic functions that display DEXi values
with dots of different sizes and colors.
Usage
expand_value_to_points(value, scale, colors = c("red", "black", "green"))
Arguments
value |
A DEXi value: a single value (integer or float), a set (integer vector) or a distribution. |
scale |
A DexiScale object. |
colors |
|
Value
A data.frame
consisting of:
points
numeric()
.value
expanded to a vector of ordinal values.sizes
numeric()
. Numeric values assigned to each corresponding ordinal values. Normally1.0
for set elements and in the(0,1]
interval for distribution membership values.colors
Colors assigned to corresponding value qualities.
Examples
scl <- DexiDiscreteScale(values = c("L", "M", "H"))
expand_value_to_points(c(1, 3), scl)
# points sizes colors
# 1 1 1 red
# 2 3 1 green
expand_value_to_points(distribution(0.1, 0, 0.9), scl)
# points sizes colors
# 1 1 0.1 red
# 2 3 0.9 green
[Package DEXiR version 1.0.2 Index]