read.table.url {base} | R Documentation |
Extensions of read.table
, scan
,
source
and file.show
to read text files on a remote HTTP (Web)
server.
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 = TRUE, file = tempfile(), check.MIME.type = TRUE, drop.ctrl.z = TRUE) url.show(url, port = 80, check.MIME.type = TRUE, file = tempfile(), delete.file = TRUE, ...)
HTTP errors are handled correctly, but attempts to read non-text files
are currently not (thus the check.MIME.type
option).
copy.url
returns the name of a temporary file.
read.table
, scan
, source
,
make.socket
, read.socket
,
file.show
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=".")