This is a test version of Biostars. For the public version, visit https://www.biostars.org.
R program - error installing ggplot2

Hi,

When I'm trying to install.packages in R program I always face with this

Error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 there is no package called ‘colorspace’

How can I fix this?

r

Although not strictly a bioinformatics question: It is hard to determine what has happened here based on limited information. I can just guess that you installed ggplot2 in a non-standard way or that the installation of the dependency (colorspace) failed, or you have an old R version. Try first a clean install by starting R --vanilla. Then:

install.packages('ggplot2')
library('ggplot2')

If you still have problems, you need to post the complete output and the output of sessionInfo().

Might also need dependencies parameter set? install.packages('ggplot2', dependencies=TRUE) I seem to get different behaviors depending on where I'm working.

Good point, this should be the default but it doesn't hurt. And local configurations may differ.

0 answers

No answers yet.

Log in to answer this question.