DexiScale is a base RC class representing value scales in R.
ordercharacter. Preferential order of the scale.
Possible values: "ascending", "descending" or "none".
count()Return the number of scale elements.
Equal to NA for DexiScale, 0 for DexiContinuousScale, and
equal to nvals >= 0 for DexiDiscreteScale.
equal(scl)Check if this scale is equal to scale scl. Needed for attribute linking.
full_range()Return the vector that represents the full range of values on this scale.
Equal to NA for DexiScale and DexiContinuousScale,
and 1 : scale$nvals for DexiDiscreteScale.
initialize(order = EnumOrder, ...)Initialize a DexiScale object.
is_continuous()Logical: Is this scale continuos?
is_discrete()Logical: Is this scale discrete?
to_string()Return a string representation of this scale for printing.
value_index(value)Find the index of value (character(1)) on this scale.
Equal to NA for DexiScale and DexiContinuousScale.
With DexiDiscreteScale objects, it returns a numeric index or NA
of value in scale$values.
value_quality(value)Return the quality (preferential class) of value on this scale:
one of the strings "bad", "none" or "good".
Always "none" for DexiScale and scales with order = "none".
verify()Check the correctnes of this scale object and its fields.
Result: error() or TRUE.
A value scale defines the type and set of values that can be assigned to some DexiAttribute. DexiScale is a base scale class that defines fields and methods common to all scales:
whether or not the scale is preferentially ordered (and in which direction),
scale type (discrete or continuous),
the number of scale elements, if countable,
partition of scale elements in three preferential classes: "bad", "good" and "none",
helper methods value_index() and full_range().
DEXiR implements two other scale classes derived from DexiScale:
DexiContinuousScale and DexiDiscreteScale.