URI | R Documentation |
This function is responsible for creating a URI object
either directly from a string or from its constituent parts.
URI
allows one to use an existing URI and replace
some or all of its components to create a new URI.
URI(u, path = "/", protocol = "http", port = 80)
u |
either a template URI or a string giving the URI in typical
user-level format, e.g. |
path |
the specification of the file within the web site.
For example, this is the string |
protocol |
a string indicating the protocol
to use to access the URI.
This is typically |
port |
the port number given as an integer or a string. Http uses 80 by default and Ftp uses 21. However, this allows us to connect using other ports on which the Web server is listening. |
An object of class URI
.
This has 4 elements.
protocol |
|
host |
|
path |
|
port |
The URI
object is merely a character vector containing these
elements.
Some of these elements may be missing if not specified.
And in other cases, they will be inserted with missing values
(NA
) to identify that they are to be overridden.
We have chosed to use S3 classes for simplicity within the project we are working.
Duncan Temple Lang <duncan@wald.ucdavis.edu>
mergeURI
## Not run:
u = URI("http://www.omegahat.org/index.html")
URI(u, protocol = "ftp")
URI(u, path = "/download/R/packages/index.html")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.