Description Usage Arguments Value Examples
This function defines attributes
output ejAttribute
1 | create_ejAttribute(name, type, value, units = NA)
|
name |
name of the attribute |
type |
type of data 'string', 'number', 'integer', 'boolean', 'date' or 'base64' |
value |
value of this attribute |
units |
The units for value. May be omitted. |
an ejAttribute object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | characterAttribute <- create_ejAttribute(name="Format name", type="string",
value="EpiJSON!")
numericAttribute <- create_ejAttribute(name="Width of building", type="number",
value=5.2,"metres")
integerAttribute <- create_ejAttribute(name="Days since last accident", type="integer",
value=as.integer(2))
logicalAttribute <- create_ejAttribute(name="Customer satisfied", type="boolean",
value=TRUE)
dateAttributeOne <- create_ejAttribute(name="Birthdate", type="date",
value=as.Date("1998-08-21"))
dateAttributeTwo <- create_ejAttribute(name="Lunch", type="date",
value=as.POSIXct("2015-05-06 12:30"))
if (require(base64enc, quietly=TRUE)){
binaryAttribute <- create_ejAttribute(name="Lunch", type="base64",
value=base64encode(as.raw(0:255)))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.