ggplot2将加载到R而不是RStudio中的新安装的R 3.4.1和RStudio 1.0.153在Windows 10 Pro(1703)64位上。 ggplot2是版本2.2.1
在我尝试时在RStudio中:
library("ggplot2", lib.loc="C:/Program Files/R/R-3.4.1/library")
我收到错误:
Error: package or namespace load failed for ‘ggplot2’:
.onLoad failed in loadNamespace() for 'grid', details:
call: fun(libname, pkgname)
error: object 'L_initGrid' not found
In addition: Warning messages:
1: failed to assign RegisteredNativeSymbol for layoutRegion to layoutRegion since layoutRegion is already defined in the ‘grid’ namespace
2: failed to assign RegisteredNativeSymbol for xsplinePoints to xsplinePoints since xsplinePoints is already defined in the ‘grid’ namespace
P.S。我用:
安装了ggplot2install.packages('ggplot2', dep = TRUE)
ggplot2在R
中加载得很好