RE: Unable to access package ggplot2

I have installed ggplot2, and when I request it in the provided sample IRIS R Script, I receive the message Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :  there is no package called 'ggplot2'. ggplot2 does load in RStudio. Has anyone met this problem? Thanks.

It sounds like you have more than one version of R installed on your computer, and ggplot2 is only installed in one of the libraries.  Check KNIME preferences to see what path it is using for R, and run R.version() or a similar commmand in R in both KNIME and R studio to see if they are the same. If this is the problem, you can google about using a shared library for all R versions installed on your computer.

-Brian

Thanks for that.

I have two active libraries namely:

"C:/Users/George/Documents/R/win-library/3.2"
"C:/Program Files/R/R-3.2.0/library"         

I ran R.Version() and it's the same in RStudio and Knime. Hmmm. Any other ideas - is Knime looking at both libraries?

When I issue the library() command from Knime, it only lists the packages in

"C:/Program Files/R/R-3.2.0/library"     

The message at the top of this screen listing says "R packages available (Not Responding)" and the screen freezes. when I close it I get a message "knime.exe is not responding" with an option to Close the program. Is this a bug in Knime?

Would you know if there's any way of changing the default install library in RStudio - it's the first one above and appears to be 'burnt in' as the default? Thanks.

 

 

 

Hi,

Just copy paste the library you have in :

"C:/Users/George/Documents/R/win-library/3.2"

in the

"C:/Program Files/R/R-3.2.0/library"  directory

Best regards

Fabien

Thanks for that - just did that - all fine now. Appreciated.

Use .libPaths() to get all library paths of your installation.

You can use .libPaths() to set more than one install library e.g.

.libPaths(c("C:/Program Files/R/R-3.2.0/library","C:/Users/George/Documents/R/win-library/3.2"))

Place this statement in your R snippet to get packages from both paths.

Is there a place for this statement to apply globally in every snippet?

 

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.