ok this is the link I found to the auto.arima function
https://www.rdocumentation.org/packages/forecast/versions/8.12/topics/auto.arima
I paste this in
auto.arima(
"S:\\CIU\\A2_Routine Reports Library\\R\\DataforTS.xlsx",
d = NA,
D = NA,
max.p = 5,
max.q = 5,
max.P = 2,
max.Q = 2,
max.order = 5,
max.d = 2,
max.D = 1,
start.p = 2,
start.q = 2,
start.P = 1,
start.Q = 1,
stationary = FALSE,
seasonal = TRUE,
ic = c("aicc", "aic", "bic"),
stepwise = TRUE,
nmodels = 94,
trace = FALSE,
approximation = (length(x) > 150 | frequency(x) > 12),
method = NULL,
truncate = NULL,
xreg = NULL,
test = c("kpss", "adf", "pp"),
test.args = list(),
seasonal.test = c("seas", "ocsb", "hegy", "ch"),
seasonal.test.args = list(),
allowdrift = TRUE,
allowmean = TRUE,
lambda = NULL,
biasadj = FALSE,
parallel = FALSE,
num.cores = 2,
x = y)
and get Error in as.ts(x) : object 'y' not found
that is the right path, r found it before.