code_modify_func {psHarmonize}R Documentation

Code modify function. To be called by the harmonization function.

Description

Code modify function. To be called by the harmonization function.

Usage

code_modify_func(
  data = temp_dataset,
  instruction = code_instruct,
  old_var = source_item_long
)

Arguments

data

Dataframe to be modified

instruction

Coding instruction from harmonization sheet

old_var

Name of original variable

Value

Vector of length equal to old_var

Examples


# Allows the user to define a function with `instruction`
# The `old_var` in `data` will be used in place of `x` in `instruction`.

code_modify_func(data = cohort_a, instruction = 'x + 5', old_var = 'age')


[Package psHarmonize version 0.3.5 Index]