Read data and code from web server

Usage

read.table.url(url, port=80,check.MIME.type=TRUE ...)
scan.url(url, port=80,check.MIME.type=TRUE ...)
source.url(url, port=80,check.MIME.type=TRUE ...)
copy.url(url, port=80,error.is.fatal=T,file=tempfile(),check.MIME.type=TRUE,drop.ctrl.z=TRUE)
url.show(url,port=80,check.MIME.type=TRUE,file=tempfile(),delete.file=TRUE,...)

Arguments

url URL beginning with http://
port Port number for the HTTP server (usually 80)
check.MIME.type Check that the document is of a type known to be plain ASCII?
... Arguments to pass to read.table,scan, source or file.show
error.is.fatal An HTTP error causes an error instead of a warning?
file File to copy to
delete.file Delete the file?
drop.ctrl.z Filter out the EOF (control-Z) character?

Description

Extensions of read.table,scan, source and file.show to read text files on a remote HTTP (Web) server. HTTP errors are handled correctly, but attempts to read non-text files are currently not (thus the check.MIME.type option).

Value

copy.url returns the name of a temporary file.

See Also

read.table,scan, source,make.socket,read.socket,file.show

Examples

read.table.url("http://lib.stat.cmu.edu/jcgs/tu",skip=4,header=T)
url.show("http://lib.stat.cmu.edu/datasets/csb/ch11b.txt")
beaver<-read.table.url("http://lib.stat.cmu.edu/datasets/csb/ch11b.dat",col.names=c("obsnum","day","time","temperature","activity"),row.names=1)
url.show("http://lib.stat.cmu.edu/datasets/csb/ch3a.txt")
ozone<-read.table.url("http://lib.stat.cmu.edu/datasets/csb/ch3a.dat",col.names=c("date","day.cts","day.passive","night.cts","night.passive"),na.strings=".")


[Package Contents]