Shares Oustanding using edgar package

Hello everyone,

I am attempting to search for shares outstanding using fillings by using the share amounts as keywords, however I am not getting any results.

   File <- company_filings("AMZN","AAPL", before = "20190101", count = 100, page = 1)

   file.list = c('5,087,056,000', '481,872,175')
   output <- searchFilings(cik.no = c('1018724','320193'),
                    form.type = c("10-K", "10-Q","8-K", "DEF 14A"),
                    filing.year = c(2017,2018), file.list)

   write_xlsx(as.data.frame(output), path = "QuoteFromFiling.xlsx")

When searching for actual words I get results, but not for the numbers. Could someone please advise?

Thanks!

Hi, and welcome!

Thanks for the code snippet. It's always helpful to make it into a complete reproducible example, called a reprex, though.

Your example, up to write_xlsx is pretty much the same as the documentation.

library(edgar)
File <- company_filings("AMZN","AAPL", before = "20190101", count = 100, page = 1)
#> Error in company_filings("AMZN", "AAPL", before = "20190101", count = 100, : could not find function "company_filings"
file.list = c('5,087,056,000', '481,872,175')
output <- searchFilings(cik.no = c('1018724','320193'),
                    form.type = c("10-K", "10-Q","8-K", "DEF 14A"),
                    filing.year = c(2017,2018), file.list)

[downloading and progress bars omitted]
head(output)
#>       cik   company.name form.type date.filed file.size nword.hits
#> 1 1018724 AMAZON COM INC      10-K 2017-02-10     24915          0
#> 2 1018724 AMAZON COM INC       8-K 2017-02-02       300          0
#> 3 1018724 AMAZON COM INC       8-K 2017-03-17       221          0
#> 4 1018724 AMAZON COM INC      10-Q 2017-04-28     13800          0
#> 5 1018724 AMAZON COM INC       8-K 2017-04-12       211          0
#> 6 1018724 AMAZON COM INC       8-K 2017-04-27       335          0

Created on 2020-01-16 by the reprex package (v0.3.0)

The files.list argument returns its results in the nwords.hits variable, which is the count of the appearances of the strings in the document.

See the docs

searchFilings function takes search word vector, CIK(s), form type(s), and year(s) as input parameters. The function first imports available downloaded filings in local woking directory 'Edgar filings' created by getFilings function; otherwise, it downloads the filings which is not already been downloaded. It then reads the filings, cleans the filings, and search for the input words. The function returns a dataframe with filing information, size of the filing, and the number of word hits.