Closed Deleetdk closed 7 years ago
Two more came up when trying to run the example command:
> mafs::select_forecast(AirPassengers, test_size = 6, horizon = 12, error = "MAPE")
Fitting the auto.arima model
Fitting the ets model
Fitting the nnetar model
Fitting the stlm model
Fitting the tbats model
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘cmprsk’
In addition: Warning messages:
1: In if (class(fit) != "try-error") models[[i]] <- fit :
the condition has length > 1 and only the first element will be used
2: In if (class(fit) != "try-error") models[[i]] <- fit :
the condition has length > 1 and only the first element will be used
3: In if (class(fit) != "try-error") models[[i]] <- fit :
the condition has length > 1 and only the first element will be used
Actually I didn't even know those packages existed so I was unaware my package used functions from them. Maybe they are dependencies of forecast
? Thanks for the tip.
mafs
now imports the aforementioned packages. I had no idea that I had to import packages that other packages depend on. Feel free to reopen this issue if some other mysterious package shows up.
My guess is that you already had them installed, so you did get not the error. I never used the forecast package before so I didn't have them installed.
A way to find out how many more errors there might be like this, try installing this package on a clean installation of R somewhere. E.g. make a virtual Linux machine using Virtualbox.
Makes sense. I'm gonna do that from now on.
I had the install multiple dependencies manually:
You should add these to the dependencies if they are necessary. Otherwise, users trying to install get errors like: