Description Usage Arguments Value Examples
This function defines events
output ejEvent
1 2 | create_ejEvent(id = NA, name, date = NULL, location = NULL,
attributes = list())
|
id |
identifier for the event |
name |
name of the event, usually a column name |
date |
date (or timestamp) for event |
location |
location for event |
attributes |
list of attributes associated with this event |
an ejEvent object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #' #generate a polygon
library(sp)
polyPoints <- matrix(c(526870,181390,526817,181447,526880,181467,
526885,181447,526909,181425,526870,181390),ncol=2,byrow=TRUE)
demoPolygon <- sp::SpatialPolygons(list(sp::Polygons(list(sp::Polygon(polyPoints)),"1")),
proj4string=sp::CRS("+init=epsg:27700"))
#Create an attribute
integerAttribute <- create_ejAttribute(name="Days since last accident", type="integer",
value=integer(2))
logicalAttribute <- create_ejAttribute(name="Customer satisfied", type="boolean",
value=TRUE)
#create an event
event <- create_ejEvent(id=1, name="A test Event", date=Sys.time(),
location=demoPolygon, attributes=list(integerAttribute, logicalAttribute))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.