getFilingHeader from Edgar package error

Hello everyone,
I am trying to get header information from Edgar database filings.
I use the Edgar package.

header_info <- getFilingHeader(cik.no = unlisted_CIK , c("N-CSR"), list_of_years,
useragent = ....)

The specification is exactly similar to this one:
output1 <- getFilings(cik.no = unlisted_CIK, c("N-CSR"), list_of_years,
useragent = .....)

The problem is the following. Output1 works perfectly. However, header_info gives an error and I don't know what to do.

*Error in $<-.data.frame(*tmp*, "sic", value = character(0)) : *

  • replacement has 0 rows, data has 10*

The error comes up after the filings were downloaded and the header information was scraped. I tried creating a dataframe before using getFilingHeader but that did not solve the problem.

Would really appreciate the help.

Try the help(getFilingHeader) example

library(edgar)
useragent <- "Your Name Contact@domain.com"
header.df <- getFilingHeader(cik.no = '38079', c('10-K', '10-Q'), filing.year = c(2005, 2006), useragent)

If that works provide the unlisted_CIK and list_of_years arguments you are using to be able to troubleshoot further.

You get the same error when using this code. As you can see there is a report for that year so that's not the issue.

library(edgar)
useragent <- "Your Name Contact@domain.com"
header.df <- getFilingHeader(cik.no = '877232', c('N-CSR'), filing.year =2015, useragent)

image

Mutual funds don't have standard industrial codes ("SIC"), which accounts for the zero rows error. My first suggestion is to write to the package author at the address shown in the Description file in the help("edgar") index page. Otherwise, the function can be copied under new name and the references to sic removed, which may solve the immediate problem. However, no assurances can be given that there are others lurking.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.