Harry
Harry

Reputation: 61

Can't load ggtern package

I'd like to create a ternary plot in r and am trying to load the ggtern package. When I load the ggtern package I get the following error message:

Error:

package or namespace load failed for ‘ggtern’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘robustbase’

I also get the following:

In addition: Warning message: package ‘ggtern’ was built under R version 3.4.4"

But I'm using RStudio v1.1.383 so wouldn't have thought it would be a problem...

Any thoughts on a solution / a workaround / alternative package?

Upvotes: 1

Views: 661

Answers (1)

MrGumble
MrGumble

Reputation: 5776

RStudio is mostly independent of R, as it is a front end. RStudio calls R to perform calculations, so this is where most restrictions come into play.

Run R.version or sessionInfo() to check which version of R you are running. Or simply note the first line in the R console when you start R/Rstudio.

I am guessing you are running R 3.4.x, but less than R 3.4.4 hence the message.

The package ggtern imports the package compositions which in turn imports robustbase. Try installing the last manually:

install.packages('robustbase')

and see what happens.

Upvotes: 1

Related Questions