各位大神,我的Rstudio安装某些包的时候,如“maptools”、“e1071”等,会出现不能安装的情况(其他包能安装)出错如下:Package which is only available in source form, and may need compilation of Fortran: ‘e1071’。求问怎么解决啊?

0
各位大神,我的Rstudio安装某些包的时候,如“maptools”、“e1071”等,会出现不能安装的情况(其他包能安装)出错如下:Package which is only available   in source form, and may need   compilation of C/C++/Fortran:   ‘e1071’。求问怎么解决啊?
已邀请:
1

marxsong 2016-09-13 回答

Rstudio默认的镜像是https://cran.rstudio.com/: 
> getOption('repos')
                                CRAN                            CRANextra 
         "https://cran.rstudio.com/" "http://www.stats.ox.ac.uk/pub/RWin" 
attr(,"RStudio")
[1] TRUE

正常都可以安装:
> install.packages('e1071')
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/e1071_1.6-7.zip'
Content type 'application/zip' length 897449 bytes (876 KB)
downloaded 876 KB

package ‘e1071’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Administrator\AppData\Local\Temp\Rtmpobqo0q\downloaded_packages


如果不行可以试试下面(国内的镜像):
install.packages('<package_name>', repo='https://mirrors.tuna.tsinghua.edu.cn/CRAN/') 
 
China
https://mirrors.tuna.tsinghua.edu.cn/CRAN/ TUNA Team, Tsinghua University
http://mirrors.tuna.tsinghua.edu.cn/CRAN/ TUNA Team, Tsinghua University
http://mirrors.xmu.edu.cn/CRAN/ Xiamen University

要回复问题请先登录注册