Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem installing factoextra package in R

Tags:

r

r-package

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’

like image 248
martinandrade Avatar asked Sep 20 '25 03:09

martinandrade


2 Answers

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

like image 84
Fifou Avatar answered Sep 22 '25 17:09

Fifou


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.

like image 24
ndhol Avatar answered Sep 22 '25 18:09

ndhol