R语言从github安装recharts包

这是困惑了一段时间的问题,之前一直在stackoverflow上面鼓捣,但是很久都没有结果,今天又拿起来捉摸,天不负,有心人,问题是在github上面安装R包是出现的,现在将问题贴在下面,


install.packages('recharts', repos = c('http://yihui.name/xran', 'http://cran.rstudio.com'))
Warning in install.packages :
  cannot open: HTTP status was '404 Not Found'
Warning in install.packages :
  cannot open: HTTP status was '404 Not Found'
Warning in install.packages :
  unable to access index for repository http://yihui.name/xran/bin/windows/contrib/3.2
installing the source package ‘recharts’

trying URL 'http://yihui.name/xran/src/contrib/recharts_0.0.3.tar.gz'
Content type 'application/octet-stream' length 899632 bytes (878 KB)
downloaded 878 KB

'D:\Program' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
Warning in install.packages :
  running command '"D:/Program Files/R/R-3.2.2/bin/x64/R" CMD INSTALL -l "D:\Program Files\R\R-3.2.2\library" C:\Users\xgf-pc\AppData\Local\Temp\RtmpwDIN6k/downloaded_packages/recharts_0.0.3.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘recharts’ had non-zero exit status

The downloaded source packages are in
    ‘C:\Users\xgf-pc\AppData\Local\Temp\RtmpwDIN6k\downloaded_packages’
下面是我的机器信息
 
  
sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8 x64 (build 9200)

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936  LC_CTYPE=Chinese (Simplified)_China.936   
[3] LC_MONETARY=Chinese (Simplified)_China.936 LC_NUMERIC=C                              
[5] LC_TIME=Chinese (Simplified)_China.936    

attached base packages:
[1] tcltk     stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] xlsx_0.5.7       xlsxjars_0.6.1   rJava_0.9-7      RODBC_1.3-12     data.table_1.9.6
 [6] dplyr_0.4.1      chron_2.3-47     sqldf_0.4-10     RSQLite_1.0.0    DBI_0.3.1       
[11] gsubfn_0.6-6     proto_0.3-10     shiny_0.12.2     devtools_1.9.1  

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.1      rstudioapi_0.3.1 knitr_1.11       magrittr_1.5     xtable_1.8-0    
 [6] R6_2.1.1         stringr_1.0.0    httr_1.0.0       tools_3.2.2      parallel_3.2.2  
[11] htmltools_0.2.6  assertthat_0.1   digest_0.6.8     curl_0.9.3       memoise_0.2.1   
[16] mime_0.4         stringi_1.0-1    jsonlite_0.9.17  httpuv_1.3.3

当时实验了,实际上不止安装recharts不成功,就是github上面的其他包也不行,今天查到说是R的安装路径有问题,安装路径中不能含有空格,于是我将R的路径修改之后,问题果然得到了解决,着实感谢开源社区,现贴上结果
> install.packages(
+     'recharts',
+     repos = c('http://yihui.name/xran', 'http://cran.rstudio.com')
+ )
Warning in install.packages :
  cannot open: HTTP status was '404 Not Found'
Warning in install.packages :
  cannot open: HTTP status was '404 Not Found'
Warning in install.packages :
  unable to access index for repository http://yihui.name/xran/bin/windows/contrib/3.2
installing the source package ‘recharts’


trying URL 'http://yihui.name/xran/src/contrib/recharts_0.0.3.tar.gz'
Content type 'application/octet-stream' length 899632 bytes (878 KB)
downloaded 878 KB


* installing *source* package 'recharts' ...
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (recharts)


The downloaded source packages are in
	‘C:\Users\xgf-pc\AppData\Local\Temp\RtmpWaf8An\downloaded_packages’
> library("recharts", lib.loc="D:/Rlanguage/R/R-3.2.2/library")
希望对遇到问题的朋友有用

你可能感兴趣的:(R,package)