[R] downloaf.file

2003-02-04 Thread Adelchi Azzalini
Dear List-members, to download a file from the net, the function download.file(..) does the job. However, before embarking on the download, I would like to find out how large the file is. Is there a way to know it? Most easily, this question has been asked before, but I am new to the list.

Re: [R] downloaf.file

2003-02-04 Thread ripley
Essentially no. Most servers will give you the length if you start the download, and then R prints it out, but it may be unknown. As in update.packages() trying URL `http://cran.r-project.org/src/contrib/PACKAGES' Content type `text/plain; charset=iso-8859-1' length 95407 bytes opened URL

Re: [R] downloaf.file

2003-02-04 Thread Barry Rowlingson
to download a file from the net, the function download.file(..) does the job. However, before embarking on the download, I would like to find out how large the file is. Is there a way to know it? You can send web servers a 'HEAD' request, which can give you some basic information about

Re: [R] downloaf.file

2003-02-04 Thread Thomas Lumley
On Tue, 4 Feb 2003, Barry Rowlingson wrote: That's bytes. Yes I know its character! I dont think web servers are under any obligation to provide accurate Content-length values. Many dynamic web servers have pages that change length every time. This will also not for for ftp:// URLs or local

Re: [R] downloaf.file

2003-02-04 Thread ripley
On Tue, 4 Feb 2003, Thomas Lumley wrote: On Tue, 4 Feb 2003, Barry Rowlingson wrote: That's bytes. Yes I know its character! I dont think web servers are under any obligation to provide accurate Content-length values. Many dynamic web servers have pages that change length every time.