There are two major purposes for this function. One is to provide a
consistent interface to reading data: a file name is given and a data frame is
returned, which can be assigned to an object as the user desires. This
differs from the behavior of data
, which doesn't return a value but
instead creates an object without explicit assignment.The other purpose is to allow instructors or other group leaders to post data
and R code on
web sites that can be searched as naturally as if the data were on the users'
own machines. For instance, an instructor might want to post a new data set
just before class, enabling her students to access it in class.
To support this, fetchData
allows new web sites to be added to the
web search path. Typically, the command to add a site would be in a script
file that is provided to the student that could be run automatically at start
up or source
d over the web. That is, an instructor might create a
script file stored on a website and, using a web page, provide students with
the text of the command to source
it.
Currently, https addresses are changed to http