【发布时间】:2011-04-12 08:55:31
【问题描述】:
为了从我一直在使用的 OSX 上的 R 中访问 CRAN 包
Sys.setenv(http_proxy="http://blah_blah:1234/")
作为 R GUI 中的第一个命令有一段时间,但真的很想自动设置这个代理。
我尝试让相同的命令在 ~/ 中的 .Rprofile 文件中工作,但没有成功
我也试过http_proxy="http://blah_blah:1234/",但这也失败了。
我在尝试查看包时遇到的错误是一个下拉窗口,上面写着:
Fetching Package List Failed
Please consult R Console output for details
GUI 然后给出:
Error in read.dcf(file = tmpf) : Line starting '<head> ...' is malformed!
.Rprofile 文件本身似乎正在加载(使用cat("my profile works\n"))检查
【问题讨论】:
-
有人会创建一个 rprofile 标签吗?现在有几个问题与 rprofile 直接相关
-
启动 R 后,输入:
Sys.getenv("http_proxy") -
如果是设置下载包的仓库,可以在profile文件中使用
options("repos"="http://cran.stat.ucla.edu/")。 -
@csgillespie Sys.getenv("http_proxy") 返回 http_proxy ""