compound_fixer: compound_fixer

View source: R/compounds.R

compound_fixerR Documentation

compound_fixer

Description

This function uses a default list of compound words (common to the SIT) and replaces the response where appropriate to match the right usage.

Usage

compound_fixer(response, comp)

Arguments

response

the response variable

comp

a named vector of compounds (e.g., c("rose bush" = "rosebush") where the response is "rosebush" and the desired change is "rose bush").

Examples


response = c("rose bush", "junkyard", "door man", "cracker jack")
compound_fixer(
  response,
  comp = c(
    "junk yard" = "junkyard",
    "crackerjack" = "cracker jack"
))


autoscore/autoscore documentation built on Sept. 19, 2022, 10:09 p.m.