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 contains labelled
class vectors or
a single vector of type labelled
into an sjPlot friendly data
frame format, which means that simply all labelled
class
attributes will be removed, so all vectors / variables will most
likely become atomic
. Additionally, tbl_df
and
tbl
class attributes will be removed from data frames. See 'Note'.Arguments
x
a data frame, which contains labelled
class vectors or a single vector
of class labelled
. Value
- a data frame or single vector (depending on
x
) with 'sjPlot' friendly
object classes.
See Also
http://www.strengejacke.de/sjPlot/datainit/{sjPlot manual: data initialization}