This function also should follow http redirects on all
platforms, which is something that does not happen by
default when curl is used, as on Mac OS X. With Windows, it calls setInternet2, which tells R
to use the internet2.dll. Then it downloads the
file by calling download.file using the
"internal" method.
On other platforms, it will try to use wget, then
curl, and then lynx to download the file.
Typically, Linux platforms will have wget
installed, and Mac OS X will have curl.
Note that for many (perhaps most) types of files, you
will want to use mode="wb" so that the file is
downloaded in binary mode.