Learn R Programming

sjPlot (version 1.7)

view_spss: View SPSS data set structure

Description

Save (or show) content of an imported SPSS data file as HTML table. Similar to the SPSS variable view. This quick overview shows variable ID numner, name, label, type and associated value labels. The result can be considered as "codeplan" of the data frame.

Usage

view_spss(df, file = NULL, alternateRowColors = TRUE, showID = TRUE,
  showType = FALSE, showValues = TRUE, showValueLabels = TRUE,
  showFreq = FALSE, showPerc = FALSE, orderByName = FALSE,
  breakVariableNamesAt = 50, encoding = NULL, hideProgressBar = FALSE,
  CSS = NULL, useViewer = TRUE, no.output = FALSE, remove.spaces = TRUE)

Arguments

Value

Invisibly returns a structure with
  • the web page style sheet (page.style),
  • the web page content (page.content),
  • the complete html-output (output.complete) and
  • the html-table with inline-css for use with knitr (knitr)
for further use.

See Also

  • http://www.strengejacke.de/sjPlot/datainit/{sjPlot manual: data initialization}
  • http://www.strengejacke.de/sjPlot/view_spss/{sjPlot manual: inspecting (SPSS imported) data frames}
  • read_spss
  • sjt.df

Examples

Run this code
# init dataset
data(efc)

# view variables
view_spss(efc)

# view variables w/o values and value labels
view_spss(efc, showValues=FALSE, showValueLabels=FALSE)

# view variables including variable typed, orderd by name
view_spss(efc, orderByName=TRUE, showType=TRUE)

# ----------------------------------------------------------------
# User defined style sheet
# ----------------------------------------------------------------
view_spss(efc,
          CSS=list(css.table = "border: 2px solid;",
                   css.tdata = "border: 1px solid;",
                   css.arc = "color:blue;"))

Run the code above in your browser using DataLab