martinandrade
martinandrade

Reputation: 41

Problem installing factoextra package in R

Hi I am using R (and RStudio in Ubuntu) I am having the following issue.

I use the line of code:

install.packages("factoextra")

During the installation I get the message:

install.packages("factoextra")
Installing package into ‘/home/martinandrade/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)

Warning in install.packages :
  dependencies ‘FactoMineR’, ‘cowplot’ are not available
also installing the dependency ‘ggpubr’

trying URL 'https://cloud.r-project.org/src/contrib/ggpubr_0.2.4.tar.gz'
Content type 'application/x-gzip' length 2665439 bytes (2.5 MB)
==================================================
downloaded 2.5 MB

trying URL 'https://cloud.r-project.org/src/contrib/factoextra_1.0.5.tar.gz'
Content type 'application/x-gzip' length 1390733 bytes (1.3 MB)
==================================================
downloaded 1.3 MB

ERROR: dependency ‘cowplot’ is not available for package ‘ggpubr’
* removing ‘/home/martinandrade/R/x86_64-pc-linux-gnu-library/3.4/ggpubr’
Warning in install.packages :
  installation of package ‘ggpubr’ had non-zero exit status
ERROR: dependencies ‘FactoMineR’, ‘ggpubr’ are not available for package ‘factoextra’
* removing ‘/home/martinandrade/R/x86_64-pc-linux-gnu-library/3.4/factoextra’
Warning in install.packages :
  installation of package ‘factoextra’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpsKLn56/downloaded_packages’

Which then produces an error message when I load the package

library("factoextra")

Error in library("factoextra") : there is no package called ‘factoextra’

Upvotes: 4

Views: 14553

Answers (5)

ndhol
ndhol

Reputation: 21

If you're using ubuntu, just follow this link https://ubuntu.pkgs.org/21.10/ubuntu-universe-arm64/r-cran-factoextra_1.0.7-2_all.deb.html. Download deb file then install on ubuntu. No need install.package from R environment. For me it works successfully.

Upvotes: 2

TomsHL
TomsHL

Reputation: 1

If you're still looking for an answer, check that the package libcurl4-openssl-dev is installed on your system.

That was the missing piece for me.

Upvotes: 0

Fifou
Fifou

Reputation: 31

For the "car" package, you can install it with this command (on linux ubuntu):

1) sudo apt-get update

2) sudo apt-get install r-cran-car

Upvotes: 3

Fifou
Fifou

Reputation: 31

You can install old version of cowplot. Here is a link: https://cran.r-project.org/src/contrib/Archive/cowplot/ and old version of FactoMineR for R version < 3.5.0. Here is the link: https://cran.r-project.org/src/contrib/Archive/FactoMineR/

Upvotes: 0

Ralf Stubner
Ralf Stubner

Reputation: 26823

Both cowplot and FactoMineR require R >= 3.5.0, while you seem to be using R version 3.4.0. One possible solution would be to use an up-to-date R from CRAN. Alternatively, you could update to Ubuntu 19.10, which also brings an up-to-date R. If both are not possible, you can try to install older versions of the required packages, e.g. from an older MRAN snapshot or with remotes::install_version().

Upvotes: 1

Related Questions