为什么我成功r 如何安装ggplot了ggplot2这个包,却加载不了

R安装ggplot2出错的解决办法 - 云中道长 - 博客园
随笔 - 81, 文章 - 0, 评论 - 8, 引用 - 0
& install.packages("ggplot2")Installing package into &C:/Users/*/Documents/R/win-library/3.2&(as &lib& is unspecified)also installing the dependency &scales&& 有二进制版本的,但源代码版本是后来的:&&&&&& binary source needs_compilationscales& 0.2.4& 0.2.5&&&&&&&&&&&& FALSE试开URL&http://mirrors./CRAN/bin/windows/contrib/3.2/ggplot2_1.0.1.zip'Content type 'application/zip' length 2677897 bytes (2.6 MB)downloaded 2.6 MB程序包&ggplot2&打开成功,MD5和检查也通过下载的二进制程序包在&&&&&&& C:\Users\*\AppData\Local\Temp\RtmpgFeANP\downloaded_packages里installing the source package &scales&试开URL&http://mirrors./CRAN/src/contrib/scales_0.2.5.tar.gz'Content type 'application/gzip' length 56346 bytes (55 KB)downloaded 55 KB* installing *source* package 'scales' ...** 成功将'scales'程序包解包并MD5和检查** libsWarning: 运行命令'make -f "C:/PROGRA~1/R/R-32~1.0/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-32~1.0/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="scales.dll" WIN=64 TCLBIN=64 OBJECTS="RcppExports.o colors.o"'的状态是127ERROR: compilation failed for package 'scales'* removing 'C:/Users/*/Documents/R/win-library/3.2/scales'下载的程序包在&&&&&&& &C:\Users\*\AppData\Local\Temp\RtmpgFeANP\downloaded_packages&里Warning messages:1: 运行命令'"C:/PROGRA~1/R/R-32~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\*\Documents\R\win-library\3.2" C:\Users\CELEST~1\AppData\Local\Temp\RtmpgFeANP/downloaded_packages/scales_0.2.5.tar.gz'的状态是1 2: In install.packages("ggplot2") : 安装程序包&scales&时退出狀態的值不是0
这是由于scales无法下载的缘故
可以用install.packages("ggplot2", repos = "http://cran.r-project.org")来解决博客访问: 8481
博文数量: 37
博客积分: 0
博客等级: 民兵
技术积分: 0
注册时间:
安徽屯溪,哈尔滨的雪地,扬州的瘦西湖,想必知道我是谁了吧!!对,小金思密达
IT168企业级官微
微信号:IT168qiye
系统架构师大会
微信号:SACC2013
分类: 大数据
安装ggplot2遇到的问题:
& library(ggplot2)
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
&&object 'vI' not found
Error: ‘ggplot2’程辑包或名字空间载入失败解决的方案:
我用的Rstudio,选择session,set working directory,我选择了D:\R\R-3.1.2,
install.packages("ggplot2")
报错如下:
also installing the dependencies ‘colorspace’, ‘Rcpp’, ‘stringr’, ‘RColorBrewer’, ‘dichromat’, ‘munsell’, ‘labeling’, ‘plyr’, ‘digest’, ‘gtable’, ‘reshape2’, ‘scales’, ‘proto’ 我这边是报错说reshape2和proto压缩文件不能打开,单独安装一下
& library(ggplot2) Use suppressPackageStartupMessages to eliminate package startup messages.(还是压缩包的问题,提示用
suppressPackageStartupMessages )
& suppressPackageStartupMessages(library("ggplot2"))
##问题解决
& library("ggplot2")
## it's ok!
阅读(1395) | 评论(0) | 转发(0) |
相关热门文章
给主人留下些什么吧!~~
请登录后评论。2被浏览970分享邀请回答01 条评论分享收藏感谢收起找不到ggplot2这个包,也安装不了
& library(ggplot2)
Error in library(ggplot2) : there is no package called ‘ggplot2’
Warning: unable to access index for repository /src/contrib:
cannot download all files
提示没有这个包怎么办?
非常感谢!
写下你的评论...
写下你的评论...
Copyright (C)
All Rights Reserved | 京ICP备 号-2

我要回帖

更多关于 r 如何安装ggplot 的文章

 

随机推荐