从私人 svn 安装 R 包
Install R package from private svn
我有一个私人 svn,登录后可通过 http
访问,我可以使用简单的 curl
读取它,如下所示:
curl --user username:password http://myrepo/mypackage/trunk
有没有办法获得相同的行为并使用 install.packages()
在 R 中安装包?
以下returns一个401 Unauthorized
错误:
install.packages("http://myrepo/mypackage/trunk", repos = NULL, type = "source")
这似乎有效:
install.packages("http://myrepo/mypackage/trunk", repos = NULL, type = "source", method="curl", extra = "--user username:password")
或者使用以下方式请求并交互式输入密码:
install.packages("http://myrepo/mypackage/trunk", repos = NULL, type = "source", method="curl", extra = "--user=username --password=pwd")
同样适用于 wget:
install.packages("http://myrepo/mypackage/trunk", repos = NULL, type = "source", method="wget", extra = "--user=username")
我有一个私人 svn,登录后可通过 http
访问,我可以使用简单的 curl
读取它,如下所示:
curl --user username:password http://myrepo/mypackage/trunk
有没有办法获得相同的行为并使用 install.packages()
在 R 中安装包?
以下returns一个401 Unauthorized
错误:
install.packages("http://myrepo/mypackage/trunk", repos = NULL, type = "source")
这似乎有效:
install.packages("http://myrepo/mypackage/trunk", repos = NULL, type = "source", method="curl", extra = "--user username:password")
或者使用以下方式请求并交互式输入密码:
install.packages("http://myrepo/mypackage/trunk", repos = NULL, type = "source", method="curl", extra = "--user=username --password=pwd")
同样适用于 wget:
install.packages("http://myrepo/mypackage/trunk", repos = NULL, type = "source", method="wget", extra = "--user=username")