kkobayashi #7112(2008/08/12 13:50 GMT) [ R ] Rating0/0=0.00
タイムアウトはtimeoutというオプション、プロキシサーバーはhttp_proxyという環境変数でそれぞれ指定します。
http_proxyは、起動後初回のダウンロード処理を実行する前に、一度だけ設定可能です。その後は設定可・不可の切り替えはできますが、プロキシサーバーのホストを変更することはできません(These environment variables must be set before the download code is first used: they cannot be altered later by calling Sys.setenv)。
タイムアウトを1秒にすると、大抵のGETは失敗してしまうみたいですね。
1 2 3 4 5
http.get <- function(url, proxy='', timeout.value=1){ options(timeout=timeout.value) Sys.setenv(http_proxy=proxy) readLines(url) }
Rating0/0=0.00-0+
[ reply ]
kkobayashi
#7112()
[
R
]
Rating0/0=0.00
タイムアウトはtimeoutというオプション、プロキシサーバーはhttp_proxyという環境変数でそれぞれ指定します。
http_proxyは、起動後初回のダウンロード処理を実行する前に、一度だけ設定可能です。その後は設定可・不可の切り替えはできますが、プロキシサーバーのホストを変更することはできません(These environment variables must be set before the download code is first used: they cannot be altered later by calling Sys.setenv)。
タイムアウトを1秒にすると、大抵のGETは失敗してしまうみたいですね。
http.get <- function(url, proxy='', timeout.value=1){ options(timeout=timeout.value) Sys.setenv(http_proxy=proxy) readLines(url) }Rating0/0=0.00-0+
[ reply ]