get_companies: Builds a companies data frame from a text file.

Description Usage Arguments Details Examples

Description

get_companies reads in the contents of a text file created from the pdf of company names and tickers given by the Russell 3000 Index.

Usage

1
2
get_companies(filepath = system.file("extdata/companies.txt", package =
  "qmj"))

Arguments

filepath

Specifies the filepath of the text file containing the company names and tickers of interest. May be either absolute or relative to working directory.

Details

The user must copy and paste the contents of the Russell 3000 Index into a text file for this function to process the data correctly. Simply select all of the component list and paste the contents into an empty document with the .txt extension. The list may be found here.

If you wish to use your own text file of companies for get_companies to process, create a text file containing each company on a separate line. Every word and ticker must be capitalized, and the ticker must be the last word, separated by a space, on each line.

get_companies by default uses a text file created from the Russell 3000 Index in the package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## The function by default uses a text
## file created from the Russell 3000 Index.

get_companies()

## As an example valid txt file, create
## 'companies.txt' in our current working
## directory containing the following two lines:
## APPLE AAPL
## GOOGLE GOOG

## Not run: 

get_companies('companies.txt')


## End(Not run)

anttsou/qmj documentation built on May 10, 2019, 12:28 p.m.