4

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?

Nicola Ben
  • 10,615
  • 8
  • 41
  • 65
Dong-gyun Kim
  • 411
  • 5
  • 23
  • If you can't upgrade R, you'll need to install an [older version of the package](https://cran.r-project.org/src/contrib/Archive/effects/) from source (requires an installation of Rtools). This could mean that you also need older versions of its dependencies. It might be easiest to use a CRAN snapshot: https://mran.microsoft.com/documents/rro/reproducibility – Roland Aug 23 '18 at 09:15

1 Answers1

10

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.

duckmayr
  • 16,303
  • 3
  • 35
  • 53