Determines the greatest common values scale between two value scales x and y in the hierarchy
nominal < ordinal < interval < ratio.
Details
Note that
the value scales interval and ratio are assumed to always be in ascending order.
the value scale none is treated specially in the sense that it is ignored when finding the common value scale between none and any other value scale.
See also
Other auxiliary functions:
as_int_vals(),
group_title(),
val_set()
Examples
qstnr::common_val_scale("interval", "nominal")
#> [1] "nominal"
qstnr::common_val_scale("interval", "ratio")
#> [1] "interval"
qstnr::common_val_scale("ordinal_ascending", "ordinal_descending")
#> [1] "nominal"
try(
qstnr::common_val_scale("ordinal_descending", "ratio")
)
#> Error in qstnr::common_val_scale("ordinal_descending", "ratio") :
#> Incompatible value scales "ordinal_descending" and "ratio" provided.