[R] R and HTTP get 'has file changed'

Dirk Eddelbuettel edd at debian.org
Fri Jul 13 04:25:15 CEST 2007


Is there a way, maybe using Duncan TL's RCurl, to efficiently test whether
an URL such as 

	http://$CRAN/src/contrib/ 

has changed?  I.e. one way is via a test of a page in that directory as per
(sorry about the long line, and this would be on Linux with links and awk
installed)

   > strptime(system("links -width 160 -dump http://cran.r-project.org/src/contrib/ | awk '/PACKAGES.html/ {print $3,$4}\'", intern=TRUE), "%d-%b-%Y %H:%M")
   [1] "2007-07-12 18:16:00"
   > 

and one can then compare the POSIXt with a cached value --- but requesting
the header would presumably be more efficient.

Is there are way to request the 'has changed' part of the http 1.1 spe
directly in R?

Thanks, Dirk

-- 
Hell, there are no rules here - we're trying to accomplish something. 
                                                  -- Thomas A. Edison



More information about the R-help mailing list