View source: R/getMasterIndex.R
getMasterIndex | R Documentation |
getMasterIndex
retrieves the quarterly master indexes from the U.S. SEC EDGAR server.
getMasterIndex(filing.year, useragent)
filing.year |
vector of integer containing filing years. |
useragent |
Should be in the form of "YourName Contact@domain.com" |
getMasterIndex function takes filing year as an input parameter from a user, downloads quarterly master indexes from the US SEC server. www.sec.gov/Archives/edgar/full-index/. It then strips headers from the master index files, converts them into dataframe, and merges such quarterly dataframes into yearly dataframe, and stores them in Rda format. It has ability to download master indexes for multiple years based on the user input. This function creates a new directory 'edgar_MasterIndex' into current working directory to save these Rda Master Index. Please note, for all other functions in this package need to locate the same working directory to access these Rda master index files. User must follow the US SEC's fair access policy, i.e. download only what you need and limit your request rates, see www.sec.gov/os/accessing-edgar-data.
Function downloads quarterly master index files and stores them into the mentioned directory.
## Not run:
useragent <- "YourName Contact@domain.com"
getMasterIndex(2006, useragent)
## Downloads quarterly master index files for 2006 and
## stores into yearly 2006master.Rda file.
getMasterIndex(c(2006, 2008), useragent)
## Downloads quarterly master index files for 2006 and 2008, and
## stores into 2006master.Rda and 2008master.Rda files.
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.