Installing ggplot2 in R (v3.2.2); says it's installed but is unable to be found/used? -


i'm having trouble installing ggplot2 package in r. according r-studio, have latest version installed; says when r studio first loads:

r version 3.2.2 (2015-08-14) -- "fire safety" copyright (c) 2015 r foundation statistical computing platform: x86_64-w64-mingw32/x64 (64-bit) 

i'm assuming means i'm using correct version. then, when try install ggplot2 package using install.packages("ggplot2") command, following error (had post in pastebin because contained links):

http://pastebin.com/deqn0vfw

it appears kind of error internet connection (not sure how fix it, googling didn't seem give concrete answer). after got error, went ahead , tried downloading .zip file ggplot2 official cran website. then, in r-studio went ahead , went tools>install packages , installed .zip. then, in console said

> install.packages("c:/users/ralei/downloads/ggplot2_1.0.1.zip", repos = null, type = "win.binary") installing package ‘c:/users/ralei/documents/r/win-library/3.2’ (as ‘lib’ unspecified) package ‘ggplot2’ unpacked , md5 sums checked 

but when call ggplot2 library using library(ggplot2) error:

> library(ggplot2) error in loadnamespace(i, c(lib.loc, .libpaths()), versioncheck = vi[[i]]) :  

there no package called ‘digest’

after going ahead , installing 'digest' package (again through cran website), got error when tried load ggplot2.

 > library(ggplot2)  error in loadnamespace(i, c(lib.loc, .libpaths()), versioncheck = vi[[i]]) :     there no package called ‘gtable’  error: package or namespace load failed ‘ggplot2’ 

can explain me i'm doing wrong?

thanks.

edit: marked duplicate "what if package isn't available" error question don't see how question duplicate of -- i'm not getting "package unavailable" error since can install manually, seems when install ggplot2, installation doesn't seem 'stick'.

try using running code..

install.packages('ggplot2',dependencies = true) 

if still facing problem make sure installing dependencies individually ("plyr","digest","gtable","reshape2","scales","proto","mass" etc) following website https://cran.rstudio.com/ , check whether install file unpacked in directory c:\users\sahidul.islam\documents\r\win-library\3.2. enter image description here

if still not working upgrade r software , packages (package can upgrade clicking "packages"+"upgrade packages..." inside menu bar in r software.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -