set_derived_variables: Apply variable labels to data frame

Description Usage Arguments Author(s) Examples

View source: R/set_derived_variables.R

Description

Takes labels from the Derived Variables excel file and applies them to the passed data frame. The function is meant to be used in the pipe.

Usage

1

Arguments

data

Data frame

path

Path to Derived Variables xls/xlsx file

sheet

Sheet to read. Either a string (the name of a sheet), or an integer (the position of the sheet). Ignored if the sheet is specified via range. If neither argument specifies the sheet, defaults to the first sheet.

drop

Logical indicating whether to drop unlabelled variables

Author(s)

Daniel D. Sjoberg

Examples

1
2
3
4
5
6
7
## Not run: 
\donttest{
trial %>%
  set_derived_variables("derived_variables_sjoberg.xlsx")
}

## End(Not run)

ddsjoberg/outfuns documentation built on Dec. 12, 2021, 12:23 a.m.