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, translate = F)

Arguments

df

data.frame, usually an object obtained by reading SPSS datafile with read_sav or 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.

translate

Logical. Use translate to auto-translate value and variable labels to English. Default is FALSE.

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 June 10, 2025, 12:58 p.m.