Learn R Programming

sjPlot (version 1.7)

to_sjPlot: Convert a haven-imported data frame to sjPlot format

Description

This function converts
  • a data frame, which was imported with any ofhaven's read functions and containslabelledclass vectors or
  • a single vector of typelabelled
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).

Usage

to_sjPlot(x)

Arguments

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}