Re: [R-pkg-devel] download.file and https

2015-07-03 Thread Dirk Eddelbuettel
On 3 July 2015 at 10:24, Paul Gilbert wrote: | The difficulty with most workarounds suggested so far is the expanded | list of dependencies. My package and quantmod, have had a simple | dependency on download.file in utils. Picking on Dirks suggestion as an | example, it would add a system depe

Re: [R-pkg-devel] download.file and https

2015-07-03 Thread Winston Chang
My downloader package was created to deal with https on various platforms: http://cran.r-project.org/web/packages/downloader/index.html The package dates back to before R had libcurl support. It's very simple: if you're on Windows, it uses setInternet2(), which enable https support, and if you'r

Re: [R-pkg-devel] download.file and https

2015-07-03 Thread Paul Gilbert
The difficulty with most workarounds suggested so far is the expanded list of dependencies. My package and quantmod, have had a simple dependency on download.file in utils. Picking on Dirks suggestion as an example, it would add a system dependency on libcurl and an R package dependency on curl

Re: [R-pkg-devel] download.file and https

2015-07-03 Thread Dirk Eddelbuettel
In random, I do the following, using R 3.2.0 or later with libcurl where installed, and Jeroen's lightweight curl::curl otherwise. getConnection <- function(urltxt, ...) { if (getRversion() >= "3.2.0" && capabilities()["libcurl"]) { url(urltxt, ..., method="libcurl") } else {

Re: [R-pkg-devel] download.file and https

2015-07-02 Thread Paul Gilbert
On 07/02/2015 11:52 PM, Duncan Murdoch wrote: On 03/07/2015 5:24 AM, Paul Gilbert wrote: On 07/02/2015 10:52 PM, Henrik Bengtsson wrote: From R 3.2.0, check: capabilities("libcurl") libcurl TRUE TRUE means R was built such that HTTPS is supported. If you see FALSE, make sure lib

Re: [R-pkg-devel] download.file and https

2015-07-02 Thread Duncan Murdoch
On 03/07/2015 5:24 AM, Paul Gilbert wrote: > > > On 07/02/2015 10:52 PM, Henrik Bengtsson wrote: >> From R 3.2.0, check: >> >>> capabilities("libcurl") >> libcurl >> TRUE >> >> TRUE means R was built such that HTTPS is supported. If you see >> FALSE, make sure libcurl is available when/if y

Re: [R-pkg-devel] download.file and https

2015-07-02 Thread Paul Gilbert
On 07/02/2015 10:52 PM, Henrik Bengtsson wrote: From R 3.2.0, check: capabilities("libcurl") libcurl TRUE TRUE means R was built such that HTTPS is supported. If you see FALSE, make sure libcurl is available when/if you build R from source. I do have TRUE for this. The default behav

Re: [R-pkg-devel] download.file and https

2015-07-02 Thread Joshua Ulrich
Hi Paul, On Thu, Jul 2, 2015 at 9:46 PM, Paul Gilbert wrote: > (This problem with download.file() affects quantmod, and possibly several > other packages. e.g. getSymbols('M2',src='FRED') fails.) > Thanks for the note. I'm aware of this, and actually wanted to ask this list what the "best practi

[R-pkg-devel] download.file and https

2015-07-02 Thread Paul Gilbert
(This problem with download.file() affects quantmod, and possibly several other packages. e.g. getSymbols('M2',src='FRED') fails.) I think the St Louis Fed has moved to using https for connections, and I believe all the US government web sites are doing this. An http request is automatically s