to_sjPlot: Convert a haven-imported data frame to sjPlot format
Description
This function converts
- a data frame, which was imported with any of
haven
's read functions and containslabelled
class vectors or - a single vector of type
labelled
into an sjPlot friendly data frame format. This means, that all labelled
class attributes
will be removed, so all vectors / variables are now most likely atomic
, and
all "label"
and "labels"
attributes are renamed into "value.labels"
and "variable.label"
(which corresponds to the forein
format).Value
a data frame or single vector (depending on x
) with 'sjPlot' friendly
vector classes and attached label attributes.See Also
- http://www.strengejacke.de/sjPlot/datainit/{sjPlot manual: data initialization}