replace_grade: Replace Grades With Words

Description Usage Arguments Value Examples

Description

Replaces grades with word equivalents.

Usage

1
replace_grade(x, grade_dt = lexicon::key_grade, ...)

Arguments

x

The text variable.

grade_dt

A data.table of grades and corresponding word meanings.

...

ignored.

Value

Returns a vector of strings with grades replaced with word equivalents.

Examples

1
2
3
4
5
6
(text <- replace_grade(c(
    "I give an A+",
    "He deserves an F",
    "It's C+ work",
    "A poor example deserves a C!"
)))

Example output

[1] "I give an very excellent excellent" "He deserves an very very bad"      
[3] "It's slightly above average work"   "A poor example deserves a average!"

textclean documentation built on May 2, 2019, 7:22 a.m.