0

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?

I just tried to install packages like "pheatmap" and "ggplot2" when I use the code: library("pheatmap"), I face this error.

r2evans
  • 141,215
  • 6
  • 77
  • 149
  • Hi Ehsan, welcome to Stack Overflow. Try this: `install.packages("colorspace")` and then `library(colorspace)` and then try again. `R` is telling you that you are missing a common package (colorspace), and some of the other packages that you are using requires this package. – David Jul 14 '23 at 10:19
  • After installing colorspace, there's no need to call `library(colorspace)` before installing `pheatmap`. – r2evans Jul 14 '23 at 11:57

0 Answers0