Claire
Claire

Reputation: 1

Error 'there is no package called 'rio'' when using fviz_dend and fviz_cluster

I'm running an ACP on a dataset and when I tried to use fviz_dend or fviz_cluster on the hcpc result it returns this error:

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): there is no package called 'rio'

Libraries FactoMineR and factoextra are loaded, ggplot2 as well.

I tried to install rio package but I had another error:

Warning message: "dependency 'foreign' is not available"

There is a binary version available but the source version is later: binary source needs_compilation rio 0.5.26 0.5.27 FALSE

installing the source package 'rio'

Warning message in install.packages("rio"): "installation of package 'rio' had non-zero exit status"

After that when I try to install library('rio') it returns an error :

there is no package called 'rio'

I've read the fviz_dend documentation and it never mention any rio.

What can I do to avoid this problem?

Upvotes: 0

Views: 723

Answers (2)

Claire
Claire

Reputation: 1

Thanck you for your help :)

I was using a jupyter notebook, now I've transfered my work on R studio and there is no more issue. I think it was linked to the operating system as you said.

Upvotes: 0

AndrewGB
AndrewGB

Reputation: 16856

It looks like rio is a dependency of both FactoMineR and factoextra. You can see if this by running the following line.

library(packrat)

packrat:::recursivePackageDependencies("FactoMineR",lib.loc = .libPaths()[1])
#[79] "purrr"   "quantreg"   "readr"   "readxl"  "rematch"   "rio" 

The error might be dependent on your operating system, so probably need to see the full error message. You may not have the proper tools (like cmake, which you would need to install on your command line) installed on your system.

Upvotes: 0

Related Questions