Error: package or namespace load failed for ‘ggplot2’

I have installed ggplot2 package successfully. This error occurred while loading package using R function library.

>library(ggplot2)
Error in loadNamespace(j < - i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called ‘Rcpp’ Error: package or namespace load failed for ‘ggplot2’ Troubleshooting Steps:
1. Remove package ggplot2 using remove.packages

> remove.packages(“ggplot2”)
Removing package from ‘C:/Users/pinnapav/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)

>install.packages(‘ggplot2’, dependencies = TRUE)

Installing package into ‘C:/Users/pinnapav/Documents/R/win-library/3.3’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/ggplot2_2.2.1.zip' Content type 'application/zip' length 2762463 bytes (2.6 MB) downloaded 2.6 MB package ‘ggplot2’ successfully unpacked and MD5 sums checked The downloaded binary packages are in C:\Users\pinnapav\AppData\Local\Temp\Rtmp84bAmJ\downloaded_packages

If above also not work, run the following commands one after the other.

remove.packages(c(“ggplot2”, “data.table”))
install.packages(‘Rcpp’, dependencies = TRUE)
install.packages(‘ggplot2’, dependencies = TRUE)
install.packages(‘data.table’, dependencies = TRUE)

CheapSexCams
Responses are currently closed, but you can trackback from your own site.

Comments are closed.

Powered by k2schools
%d bloggers like this: