\Header{read.table.url}{Read Data and Code from a URL}
\alias{scan.url}{read.table.url}
\alias{source.url}{read.table.url}
\alias{url.show}{read.table.url}
\keyword{file}{read.table.url}
\keyword{misc}{read.table.url}
\begin{Description}\relax
Extensions of \code{\Link{read.table}}, \code{\Link{scan}},
\code{\Link{source}}
and \code{\Link{file.show}} to read text files on a remote 
server.\end{Description}
\begin{Usage}
\begin{verbatim}
read.table.url(url, method = "auto",...)
scan.url(url, file = tempfile(), method = "auto", ...)
source.url(url, file = tempfile(), method = "auto", ...)
url.show(url, title = url, file = tempfile(),
         delete.file = TRUE, method = "auto", ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{url}] The URL to read from
\item[\code{method}] File transfer method: see \code{\Link{download.file}}
\item[\code{...}] Arguments to pass to \code{\Link{read.table}},
\code{\Link{scan}}, \code{\Link{source}} or
\code{\Link{file.show}}.
\item[\code{file}] File to copy to.
\item[\code{delete.file}] Delete the file afterwards?
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
These functions call \code{\Link{download.file}} to create a temporary
local file. The file can be downloaded by \code{lynx} or \code{wget}
if these are available on the system. Another option is a direct
\code{HTTP} socket connection, if the local machine allows this.\end{Details}
\begin{Value}
The same value as the respective file-based functions.\end{Value}
\begin{SeeAlso}\relax
\code{\Link{read.table}}, \code{\Link{scan}}, \code{\Link{source}},
\code{\Link{make.socket}}, \code{\Link{read.socket}},
\code{\Link{file.show}},\code{\Link{download.file}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
read.table.url("http://lib.stat.cmu.edu/jcgs/tu",
   skip=4, header=TRUE)
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)
# the next two examples will only work if socket connections to
# statlib are allowed from your site.
url.show("http://lib.stat.cmu.edu/datasets/csb/ch3a.txt",
                  method="socket")
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=".", method="socket")
\end{ExampleCode}
\end{Examples}

