label_book: Create a codebook, table of labels to explore variables and...

View source: R/label_book.R

label_bookR Documentation

Create a codebook, table of labels to explore variables and values in your data

Description

Create a codebook, table of labels to explore variables and values in your data

Usage

label_book(df, max.vals = 25, vars = "all", view = TRUE)

Arguments

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.

Details

For Haven and Foreign read spss files only. The only extra package required is knitr.

Examples

## 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)

MaksimRudnev/LittleHelpers documentation built on Nov. 5, 2024, 10:16 p.m.