label_book | R Documentation |
Create a codebook, table of labels to explore variables and values in your data
label_book(df, max.vals = 25, vars = "all", view = TRUE)
df |
data.frame, usually an object obtained by reading SPSS datafile with have::read_sav or foreign::read.spss |
max.vals |
integer, how many value labels per each variable shoud be listed in the table, default is 25 |
vars |
can be integer, character, or range of integers or characters. Variables indexes or names for getting subsets of label book. |
view |
logical, whether the result should be shown in the RStudio viewer pane. Default is TRUE. If FALSE, html file named 'label_book_output.html' is saved in your working directory. |
For Haven and Foreign read spss files only. The only extra package required is knitr
.
## Example
## Not run:
## 1.Read the data
#ess8<- haven::read_sav("ESS8e01.sav")
## 2. Use the function
#label_book(ess8, max.vals=11, vars=45:50)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.