R 指定安装镜像的方法

方法一

options(repos=structure(c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/")))
install.packages("包名")
 

方法二

install.packages("ABC",repos="http://mirror.bjtu.edu.cn/ ") ## 换成北大镜像
 

在RStudio中修改

Tools --> Global Options --> Packages --> Changes

 

 

 
国内其他镜像
China
https://mirrors.tuna.tsinghua.edu.cn/CRAN/     TUNA Team, Tsinghua University
http://mirrors.tuna.tsinghua.edu.cn/CRAN/       TUNA Team, Tsinghua University
https://mirrors.ustc.edu.cn/CRAN/                     University of Science and Technology of China
http://mirrors.ustc.edu.cn/CRAN/                       University of Science and Technology of China
https://mirror-hk.koddos.net/CRAN/                   KoDDoS in Hong Kong
https://mirrors.eliteu.cn/CRAN/                          Elite Education
https://mirror.lzu.edu.cn/CRAN/                         Lanzhou University Open Source Society
http://mirror.lzu.edu.cn/CRAN/                           Lanzhou University Open Source Society
https://mirrors.tongji.edu.cn/CRAN/                  Tongji University
https://mirrors.shu.edu.cn/CRAN/                     Shanghai University

查找镜像地址
 

posted on 2019-07-06 15:33  0820LL  阅读(464)  评论(0编辑  收藏  举报

导航