Caret gets an error after upgrading

Asked 2 years ago, Updated 2 years ago, 37 views

R(ver3.1.1) works, but R(ver3.3.1) fails.

tmp<-dummyVars (~days, data=data1)
predict(tmp, data1)

The following error occurred while executing this predict:

Error in
options(contrasts=newCntr): Invalid value for 'contrasts'

As previously mentioned, ver3.1.1 works fine.
Does it mean that the package is not compatible with 3.3.1

r

2022-09-30 18:49

1 Answers

The package supports 3.3.1.Can you reproduce the problem data1 and expect a better answer?

I guess options("contrasts") contains a value that is not the default c("cont.treatment", "cont.poly").
If so, resolve with options(contrasts=c("cont.treatment", "cont.poly").


2022-09-30 18:49

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.