0

I am trying install the R package esquisse, when I try to install it I get the following error message

Installing package into ‘/home/nir020/R/library’
(as ‘lib’ is unspecified)
Warning in install.packages :
  dependency ‘foreign’ is not available

But when i try to install the foreign package, I get the following error message

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

Do I need to update my version of R (difficult) or are there any other alternative solutions

M--
  • 25,431
  • 8
  • 61
  • 93
Nick Read
  • 53
  • 2
  • 2
    (1) https://stackoverflow.com/questions/25721884/how-should-i-deal-with-package-xxx-is-not-available-for-r-version-x-y-z-wa is a good place to start. Just as importantly, though, is that (2) R-3.5.1 is quite a bit out of date, so you may want to consider upgrading to a newer version (generally R-4 or newer is recommended, current is R-4.1.1). You are unlikely to find the binary packages you want by default, you'll need to take some extra steps (see the link) to install them on R-3.5.1. – r2evans Oct 15 '21 at 14:32

1 Answers1

0

(1) This is a warning, not an error, so esquisse might just work. (2) foreign is not available from CRAN because it's a recommended package, i.e. one that comes with a base R installation (and IIRC has been that way for many years).

I do see foreign in the dependencies of esquisse:

sort(package_dependencies("esquisse", recursive=TRUE)$esquisse)

but it's hard to trace the dependency back (it's not a direct dependency). I don't know why it wouldn't have been detected as already installed.

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453