This function adds level/label information as an annotation to either factors
or labelled
variables. This function is called notate()
rather than
annotate()
to avoid conflict with ggplot2::annotate()
. It is a generic that
can operate either on individual vectors or on a data.frame
.
When printing labelled
variables from a tibble
in a console, both the
numeric value and the text label are shown, but no variable labels. When
using the View()
function, only variable labels are shown but no value
labels. For factors, there is no way to view the integer levels and values at
the same time.
In order to allow the viewing of both variable and value labels at the same
time, this function converts both factor
and labelled
variables to
character
, including both numeric levels (labelled
values) and character
values (labelled
labels) in the output.
Arguments
- x
The object (either vector or
date.frame
of vectors), that one desires to annotate and/or view.
Value
The processed data.frame
, suitable for viewing, in particular
through the View()
function.