Save (or show) content of an imported SPSS, SAS or Stata data file,
or any similar labelled data.frame
, as HTML table.
This quick overview shows variable ID number, name, label,
type and associated value labels. The result can be
considered as "codeplan" of the data frame.
view_df(x, weight.by = NULL, altr.row.col = TRUE, show.id = TRUE, show.type = FALSE, show.values = TRUE, show.string.values = FALSE, show.labels = TRUE, show.frq = FALSE, show.prc = FALSE, show.wtd.frq = FALSE, show.wtd.prc = FALSE, show.na = FALSE, max.len = 15, sort.by.name = FALSE, wrap.labels = 50, hide.progress = FALSE, CSS = NULL, encoding = NULL, file = NULL, use.viewer = TRUE, no.output = FALSE, remove.spaces = TRUE)
x | A (labelled) data frame, imported by |
---|---|
weight.by | Name of variable in |
altr.row.col | Logical, if |
show.id | Logical, if |
show.type | Logical, if |
show.values | Logical, if |
show.string.values | Logical, if |
show.labels | Logical, if |
show.frq | Logical, if |
show.prc | Logical, if |
show.wtd.frq | Logical, if |
show.wtd.prc | Logical, if |
show.na | logical, if |
max.len | Numeric, indicates how many values and value labels per variable are shown. Useful for variables with many different values, where the output can be truncated. |
sort.by.name | Logical, if |
wrap.labels | numeric, determines how many chars of the value, variable or axis labels are displayed in one line and when a line break is inserted. |
hide.progress | logical, if |
CSS | A |
encoding | Character vector, indicating the charset encoding used
for variable and value labels. Default is |
file | Destination file, if the output should be saved as file.
If |
use.viewer | Logical, if |
no.output | Logical, if |
remove.spaces | Logical, if |
Invisibly returns
the web page style sheet (page.style
),
the web page content (page.content
),
the complete html-output (page.complete
) and
the html-table with inline-css for use with knitr (knitr
)
for further use.
# NOT RUN { # init dataset data(efc) # view variables view_df(efc) # view variables w/o values and value labels view_df(efc, show.values = FALSE, show.labels = FALSE) # view variables including variable typed, orderd by name view_df(efc, sort.by.name = TRUE, show.type = TRUE) # User defined style sheet view_df(efc, CSS = list(css.table = "border: 2px solid;", css.tdata = "border: 1px solid;", css.arc = "color:blue;")) # }