35

I just updated to R 2.11.1 and after installing ggplot2, I tried

library(ggplot2)

and got

Loading required package: proto
Loading required package: grid Loading
required package: reshape Loading
required package: plyr Loading
required package: digest Error in
eval(expr, envir, enclos) : could not
find function "proto" In addition:
Warning message: In library(package,
lib.loc = lib.loc, character.only =
TRUE, logical.return = TRUE,  :  
there is no package called 'proto'
Error : unable to load R code in
package 'ggplot2' Error:
package/namespace load failed for
'ggplot2'

Any help appreciated.

A5C1D2H2I1M1N2O1R2T1
  • 190,393
  • 28
  • 405
  • 485
Peter Flom
  • 2,008
  • 4
  • 22
  • 35
  • Did you try `install.packages("proto")` after getting this? – Shane Jun 28 '10 at 16:06
  • 1
    You are probably missing the `proto` package. Have you tried to install it? – nico Jun 28 '10 at 16:07
  • My experience was that library(ggplot2) loaded fine but a call to ggsave() would generate an error about 'digest' as a missing package. The solution below fixed my issue as well. – ripvlan Feb 10 '16 at 21:42
  • Related post: [How should I deal with “package 'xxx' is not available (for R version x.y.z)” warning?](http://stackoverflow.com/questions/25721884) – zx8754 Jul 07 '16 at 07:42

5 Answers5

78

install.packages('ggplot2', dep = TRUE) would do the trick... install proto package

aL3xa
  • 35,415
  • 18
  • 79
  • 112
22

Open R shell and type following in it

install.packages('ggplot2', dep = TRUE)

then it will ask you to select the mirror, select closest one and it will install it and solve your problem.

Hafiz Muhammad Shafiq
  • 8,168
  • 12
  • 63
  • 121
3

Also have had troubles, when installing ggplots2, but here is a curious solution (tested on windows):

  • I installed via RStudio. Both from Tools->install packages and by typing install.packages("ggplots2", dep=T). It didn't work because it kept not installing the dependencies.

  • I then installed direct by R gui install.packages("ggplots2", dep=T) and everything went well.

CAFEBABE
  • 3,983
  • 1
  • 19
  • 38
leonardo
  • 31
  • 1
1

I had the same problem and this did the trick.

  1. Install the lazyeval package.
  2. Then install ggplot2
  3. Load the ggplot2 library and everything will hopefully work fine.
Kurt Van den Branden
  • 11,995
  • 10
  • 76
  • 85
Ali
  • 11
  • 1
1

Steps 1.Go To -> Tools 2.Click -> Install Packages 3.In Packages Text Box Type ggplot2 Check the checkbox & install dependencies

And your good to go !

Vaibhav Pallod
  • 466
  • 7
  • 21