Description Usage Arguments Value Author(s) See Also
This function is a high-level interface to create KML document from R data. The idea is that it will be extended to call different KML generation functions. For the moment, it calls kmlTime or kmlPoints.
This is a generic function with methods for various types of inputs.
The important one is the formula interface. We can specify the
names of the variables in our data frame that identify
longitude and latitude, time.
The formula language we use is similar to that of R's modelling
and lattice graphics systems. But we introduce the notion of time
which is specified via the @
symbol, e.g.
~ X + Y @ Time
.
The intent is to allow transformations of these variables, including
allowing the invocation of functions on the right-hand-side of the
formula, e.g. view(X, Y, Time) ~ X + Y @ Time
,
hist(X, Y) ~ X + Y
.
The function can create KML nodes or returns objects of a class for which there is
a method for the toKML function.
More thought is needed to make this coherent and useful.
1 2 | kml(x, data, folderName = deparse(substitute(data)),
docDescription = deparse(substitute(x)), ...)
|
x |
a formula or data frame |
data |
the data frame |
folderName |
a character string giving the name to use for the folder in the Google Earth display for this collection of display elements |
docDescription |
a character string giving a description for this display. This is displayed when the Google Earth user double clicks on the entry in the Places list. |
... |
additional arguments for the methods |
Typically, a KMLDoc object which is an XML (internal) document.
Duncan Temple Lang
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.