[R] make check failure, internet.Rout.fail, Error in strsplit

Paul Lynch plynchnlm at gmail.com
Tue Feb 13 00:28:17 CET 2007

I'm trying to build R on RedHat EL4.  The compile went fine, but a
make check ran into a problem and produced a file
"internet.Rout.fail".  Judging by the last part of that file, it was
trying to run an R routine called "httpget" to retrieve the URL
http://www.stats.ox.ac.uk/pub/datasets/csb/ch11b.dat.  The precise
error it encountered was:

Error in strsplit(grep("Content-Length", b, value = TRUE), ":")[[1]] :
        subscript out of bounds

So, it looks like the data it read from that URL was not what was
expected.  I tried mimicking the script's request of the header
information for that URL, and got back the following header lines:

HTTP/1.1 200 OK
Date: Mon, 12 Feb 2007 23:22:06 GMT
Server: Apache/2.0.40 (Red Hat Linux)
Last-Modified: Fri, 19 May 1995 10:27:04 GMT
ETag: "7bc27-836-39a78e00"
Accept-Ranges: bytes
Content-Type: text/plain; charset=ISO-8859-1
Content-length: 2102
Connection: Keep-Alive

The script appears to be looking for a "Content-Length" field, but as
you can see the returned header is "Content-length" with a lower-case
l.  I don't know R yet, so I'm not sure if the grep in the test code
is case-sensitive or not, but if it is, that would seem to be the
problem.  But then, surely everyone would be hitting this error?

Can anyone offer some suggestions as how to proceed from here?  Thanks,

More information about the R-help mailing list