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


#1

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!


#2

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


#3

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