Can't call a function from the package's namespace with the do.call function

I am trying to import the auto.arima function from the forecast package namespace to use it within my function.

This works fine:

md1 <- forecast::auto.arima(train, stepwise = FALSE)

However when trying to use the same function with the do.call function, I am getting an error that the auto.arima function is not an exported object from the forecast package namespace:

md1 <- base::do.call(forecast::auto.arime, c(list(train), a.arg))

Error: 'auto.arime' is not an exported object from 'namespace:forecast'

Any thoughts how to get it work? Thanks!

Totally naive answer here, but looks like you have a typo in your second line of code. Shouldn’t it be forecast::auto.arima?

2 Likes

Holy cow!!! you are right! I should stop writing a code after midnight :slight_smile:
Thanks!

2 Likes