credo.companycode_old: Recodes Mutual Fund Company Names in Canada from Verbatim...

Description Usage Arguments Value References Examples

Description

This function takes a character vector or factor, and recodes misspelled words into the corrected company names. Uses pre-programmed find and replace.

Usage

1
credo.companycode_old(verbatim, hold.na = FALSE, other = TRUE)

Arguments

verbatim

A character vector or factor to be recoded

hold.na

Logical, maintain NA values to keep ordering

other

convert unmatched to "Other" or leave as is

Value

m A list containing recoded factors ($verbatims) and unmatched values ($unmatched)

References

Trim functionality courtesy of f3lix: http://stackoverflow.com/a/2261149/170352

Examples

1
2
3
4
verbatim <- c("CI","bmo","cibc","renaisance","vpi",NA,"Aim","why")
credo.companycode(verbatim)
credo.companycode(verbatim, TRUE)
credo.companycode(verbatim, TRUE, FALSE)

credoinc/credoc documentation built on May 23, 2019, 8:39 a.m.