See ?download.file and argument 'mode'. You want to use
mode="wb".
To R-core: I've asked it before, isn't the most common use case to
download files in 'binary' mode? I cannot even remember when I last
wanted to transfer a file in 'text' mode. I vote for making
mode="wb"
the default.
/Henrik
On Fri, Nov 14, 2008 at 7:21 AM, Fernando Bizuet <fbizuet at gmail.com>
wrote:> Hello,
> I have been trying to download a pdf file but I only receive
> a blank sheets.
>
> I used the option internet2 in windows:
>
> Rgui.exe --internet2
>
> but I recieved the same result.
>
> I use the next command:
>
> ulr2 <- "http://cran.r-project.org/doc/manuals/R-intro.pdf"
>
> download.file(url = ulr2, destfile =
"D:\\users2\\r-intro.pdf",cacheOK > FALSE)
> Any ideas how I can resolve this problem?
>
> Thanks in advance,
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>