using R package 'effects' in R version 3.4

2020-02-11 07:19发布

问题:

Currently, I'm using R version 3.4.4. And I'm trying to use R package 'effects'. But I can't install & use this package on this version.

code
install.packages("effects")
library(effects)
plot(allEffects(lm_g_sc), type="response")

results

Warning in install.packages : package ‘effects’ is not available (for R version 3.4.4)

What can I do? If I can't use this package, there are some alternative packages?

回答1:

As a result of a related Stack Overflow question, I built a package specifically for this purpose, oldr. The package is available here:

https://github.com/duckmayr/oldr

You can install via

devtools::install_github("duckmayr/oldr")

Once the package is installed, you just need to run

oldr::install.compatible.packages("effects")

The function oldr::install.compatible.packages() searches through the CRAN archives to find the newest version of the package that is compatible with your installed version of R.