cleanSector: Clean sector names

Description Usage Arguments Details Value See Also Examples

Description

This function takes a character vector input and parses through the SMIF Asset Allocation sectors dataset and attempts to coerce the input into a sector compliant with SMIF AA sector formatting guidelines.

Usage

1
cleanSector(sector, verbose = getOption("verbose", FALSE))

Arguments

sector

Character; string to be transformed into a uniform sector

verbose

Logical; whether the function should throw messages. Defaults to getOption("verbose")

Details

If sector cannot be retrieved from NASDAQ or cannot be coerced, returns "Other"

Value

Character; string representation of a sector

See Also

Other data cleaning functions: cleanAccount, cleanIP, cleanIndex

Examples

1
cleanSector("Consumer Non-Durables")

alec25/smif.package documentation built on May 22, 2019, 12:36 p.m.