Description Usage Arguments Details Value Examples
This function loads an spss .sav file, and creates a dataframe with the description, type and labels of all variables in the data file. This function automatically applies as_factor to the data, converting all variables with labels in spss to factors in R.
1 |
file |
A characater string with the location of the spss file to be loaded. |
To convert labels to factors function haven::as_factor(.,only_labelled = TRUE,ordered=TRUE)
is used.
For details, see ?as_factor
.
The dataframe with the description of all variables contains the following information:
var: Variable name
name: Variable label
class: Variable class
valid: Number of valid cases
n.na: Number of NA
's
n.distinct: Number of distinct values
A list with two components:
sav(dataframe): with the actual data
vars(dataframe): with the description of all variables
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.