Error: Input year(s) is not numeric in R

Hello guys,

I need your help regarding an error in R which is the following:

Error: Input year(s) is not numeric in R

However, I check the input (year, e.g. 2004) using the command class(2004) and the answer is numeric.

Does anyone know what is the problem and how can I fix it?

Thank you in advance.


To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:

Ok. I am trying to download edgar filings which downloads the files from the website (using the edgar package in R).

I run the following code:
for (year in c(2004,2005,2006,2007,2008,2009,2010,2010,2011,2012,2013,2014,2015,2016,2017)){
report <- getFilings(2017, 1720635 , 'ALL')

after running the above code, I have the following error:
Error: Input year(s) is not numeric.

Looking at documentation (, it looks like this - report <- getFilings(2017, 1720635 , 'ALL') - is incorrect syntax. Specifically, third parameter is supposed to be filing.year, but in your case it's 'ALL':

getFilings(, form.type, filing.year, quarter, downl.permit)

1 Like

I don't know why but this code worked before two weeks.

Anyway, thank you so much Mishabalyasin . It's works :slight_smile:

Perhaps, the version has been updated recently and there were some breaking changes in the order of the arguments.

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

1 Like

This topic was automatically closed 7 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.