company_function: Obtain consumer complaint information about a specific...

Description Usage Arguments Details Value Author(s) Examples

View source: R/company_function.R

Description

It displays various useful summaries of the number of consumer complaints pertaining to different categories of interest for a single company, and puts them in dataframe(s).

Usage

1
2
company_function(product_option = TRUE, issue_option = TRUE,
  response_option = TRUE, public_option = FALSE)

Arguments

product_option

A logical indicating whether to aggregate all the consumer complaints by product category under the selected company. If (TRUE), such information will be created in the form of a dataframe as the output. Defaults to (TRUE)

issue_option

A logical indicating whether to aggregate all the consumer complaints by issue category under the selected company. If (TRUE), such information will be created in the form of a dataframe as the output. Defaults to (TRUE)

response_option

A logical indicating whether to aggregate all the consumer complaints by company response category under the selected company. If (TRUE), such information will be created in the form of a dataframe as the output. Defaults to (TRUE)

public_option

A logical indicating whether to aggregate all the consumer complaints by public company response category under the selected company. If (TRUE), such information will be created in the form of a dataframe as the output. Defaults to (FALSE), as not all companies have a public response

Details

The function will first prompt the user to enter the desired company as an input for its first parameter. The input will be used to then guess possible suggestions related to that company name. This is necessary as the company name has to be inputted exactly the same as what is recorded in the consumer complaint database. Once the user finds the right suggestion, the user is prompted again to input the correct name of the company. Once that is complete, it will display any of the four possible summarization options. The user can specify whether to include any one or all of the summarization options by specifying (TRUE) or (FALSE).

Value

A list of the dataframe(s) of the options selected. Multiple dataframes are presented as a list because a function can only return one output. As such, by feeding multiple dataframes through a list, multiple outputs can be achieved.

Author(s)

Jae Woong Ham

Examples

1
#No examples can be demonstrated, as it requires a manual user input from a prompt

JaeWHam/WorkSample documentation built on Feb. 18, 2020, 12:26 a.m.