ggplot library() error R version 3.1.3 - r

I installed ggplot2 using install.packages() function. It gets installed properly and shows in the Packages pan. However, when I run library(ggplot2), I get the following error:
library("ggplot2", lib.loc="~/R/win-library/3.1")
Error in library.dynam(lib, package, package.lib) :
DLL ‘digest’ not found: maybe not installed for this architecture?
Error: package or namespace load failed for ‘ggplot2’
What is going on here? Can somebody help, please?

Related

Error: package or namespace load failed for ‘CGPfunctions’ [duplicate]

I am getting the following error when I am loading a few libraries in R:
library(forecast)
Error : object ‘f_eval’ is not exported by 'namespace:lazyeval'
In addition: Warning message:
package ‘forecast’ was built under R version 3.3.2
Error: package or namespace load failed for ‘forecast’
library(tsoutliers)
Error : object ‘f_eval’ is not exported by 'namespace:lazyeval'
In addition: Warning message:
package ‘tsoutliers’ was built under R version 3.3.2
Error: package or namespace load failed for ‘tsoutliers’
I have tried reinstalling the packages but it didn't help. Also, I was able to use the forecast package previously but I started facing this error post the installation of tsoutliers package.
How can I resolve this issue?
This should do the job for you:
install.packages('lazyeval')
In the future, try and provide a bit more about your system and install, using the output from:
sessionInfo()

Can't install tmap R Package

I am having trouble installing the tmap R package. I am trying to install it using install.packages("tmap") and mn receiving this error:
Error: package or namespace load failed for ‘tmap’ in namespaceExport(ns, exports):
undefined exports: providers
Error: loading failed
Execution halted
ERROR: loading failed
Warning in install.packages :
installation of package ‘tmap’ had non-zero exit status
I'm new to R, but have tried many of the basic bug fix approaches (Reinstalling R Studio, quitting and restarting a session, installing from a local tar.gz instead of CRAN) but none seem to work. I think the package is being installed successfully but is not being loaded. Is that correct? How would I get tmap to load correctly?
I'm using R vers 3.6.1
Cheers
The object providers is re-exported from leaflet. Please make sure that leaflet is installed correctly, and check if leaflet::providers exists.
I would also strongly recommend to upgrade R to 4.x, if possible. I recall that there were some packages in the dependency/imports tree that didn't work well for R 3.x.

Why do I get an error when I try to load ggplot2 in R?

When I run:
library("ggplot2")
I get the error below:
Error: package or namespace load failed for ‘ggplot2’:
object ‘enexprs’ is not exported by 'namespace:rlang'
In addition:
Warning message:
package ‘ggplot2’ was built under R version 3.4.4
Any idea how I can solve this issue?
Please install the latest version of rlang to solve this error.

Packages won't run after installing in Rstudio

I have installed the packages psych and ggplot2 in Rstudio. However I am not able to load these packages because I keep getting these error messages:
library("psych", lib.loc="~/R/win-library/3.3")
Error in runHook(".onLoad", env, package.lib, package) :
cannot open file 'C:/Users/Ernstsen/Documents/R/win-library/3.3/mnormt/R/mnormt.rdb': No such file or directory
Error: package or namespace load failed for ‘psych’
> library("ggplot2", lib.loc="~/R/win-library/3.3")
Error in library.dynam(lib, package, package.lib) :
DLL ‘colorspace’ not found: maybe not installed for this architecture?
Error: package or namespace load failed for ‘ggplot2’
And this error:
package ‘ggplot2’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Ernstsen\AppData\Local\Temp\RtmpoTRXOY\downloaded_packages
> library("ggplot2", lib.loc="~/R/win-library/3.3")
Error in library.dynam(lib, package, package.lib) :
DLL ‘colorspace’ not found: maybe not installed for this architecture?
Error: package or namespace load failed for ‘ggplot2’
I have tried installing Rcpp, reinstalling R and Rstudio, using install.packages('ggplot2', dependencies = TRUE) for both packages, I'm not sure what else I can do. This program was working fine on my older computer before it died.
There are several causes why this can happen, and on Windows there's the permissions issue if your R install directory was Administrator privileges and/or was under "C:\Program Files" or "C:\Program Files (x86)". Trying to install and maintain packages under those is a nightmare - constant permissions issues.
Moving your R package directory instead to your ~ is a good idea, esp. if you installed as Administrator, or use one of the more permissions-freakish licenses like Windows Business/Enterprise.

ffbase package fails to load

I have just installed the ff and ffbase packages in R, and while library(ff) works, library(ffbase) returns the following error:
> library(ffbase)
Error in library.dynam(lib, package, package.lib) :
DLL ‘fastmatch’ not found: maybe not installed for this architecture?
Error: package or namespace load failed for ‘ffbase’
I use the latest version R 3.0.2.
Any help how I can fix that error will be appreciated dearly. I have uninstalled R and reinstalled everything, to no avail.

Resources