add_quant1
is a variant of add_quant_labs
that allows you to specify only
one var to label but allows you to pass its name without quoting it
(compare add_quant1
(mtcars, mpg) to add_quant_labs
(mtcars, "mpg").
Numerical variables that feature decimals or large numbers of distinct values
are not eligible to receive conventional value labels. add_quant1
allows
one to label such variables according to user-supplied value thresholds
(i.e., cutpoints) OR quantile membership, Thus, unlike value labels added
with add_val_labs
(and add_val1
), add_quant1
(and add_quant_labs
)
will apply the same value label to all values that fall within the numerical
value range defined by each threshold (cutpoint). For still another
value-labeling approach, see add_m1_lab
(and add1m1
).
Note 1: Quantity labels cannot be added incrementally through repeated calls
to add_quant1
: each new call will overwrite all value labels applied to
the specified vars in any previous add_quant1
calls. This is in contrast to
add_val_labs
(which allows for incremental value-labeling) and add_m1_lab
(which requires incremental value-labeling).
Note 2: aql1
is a compact alias for add_quant1
: they do the same thing, and
the former is easier to type
Note 3: This command is intended exclusively for interactive use. In
particular, the var argument must be the literal name of a single variable
(column) found in the supplied data.frame and may NOT be, e.g., the name of a
character vector that contains the variable (column name) of interest. If you
wish to supply a character vector with the names of variables (columns) of
interest, use add_quant_labs()
.