Description Usage Arguments Value Examples
View source: R/epijsonObjectVis.R
to view the structure of epijson objects and/or schema allowing multiple attribute boxes with different labels
1 2 3 4 5 6 7 8 | epijsonObjectVis(attribMeta = "attributes [name, type, value, units]",
attribRecord = "attributes [name, type, value, units]",
attribEvent = "attributes [name, type, value, units]",
labelObject = "Diagram of EpiJSON file structure", labelMeta = "metadata",
labelRecord = "records [id]",
labelEvent = "events [id, name, date, location]", colAll = NULL,
colObject = "gray60", colMeta = "gray60", colRecord = "blue",
colEvent = "red", colAttrib = "purple", textSize = 4)
|
attribMeta |
label(s) for Metadata attributes |
attribRecord |
label(s) for Record attributes |
attribEvent |
label(s) for Event attributes |
labelObject |
label for the overall object |
labelMeta |
label for Metadata attributes |
labelRecord |
label for Record attributes |
labelEvent |
label for Event attributes |
colAll |
optional single box colour to overide all other col args, e.g. 'grey' |
colObject |
object box colour |
colMeta |
metadata box colour |
colRecord |
record box colour |
colEvent |
event box colour |
colAttrib |
attribute boxes colour |
textSize |
size of labels default=4 |
a ggplot object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #this gives the base schema
epijsonObjectVis()
#settin single box colour and increasing text size
epijsonObjectVis(colAll ='grey', textSize=7)
#this gives a diagram with named attributes
epijsonObjectVis( attribMeta = c("attribute: disease","attribute: data provider"),
attribRecord = c("attribute: gender","attribute: date of birth"),
attribEvent = c("attribute: recorder","attribute: test used") )
epijsonObjectVis( attribMeta = c("a"),
attribRecord = c("b","c"),
attribEvent = c("d","e","f") )
#repijson objects
epijsonObjectVis( attribMeta = 'ejAttribute',
attribRecord = 'ejAttribute',
attribEvent = 'ejAttribute',
labelObject = 'ejObject',
labelMeta = 'ejMetadata',
labelRecord = 'ejRecord',
labelEvent = 'ejEvent')
#repijson objects and constructors
epijsonObjectVis( attribMeta = 'ejAttribute create_ejAttribute()',
attribRecord = 'ejAttribute create_ejAttribute()',
attribEvent = 'ejAttribute create_ejAttribute()',
labelObject = 'repijson R objects and constructors : ejObject create_ejObject()',
labelMeta = 'ejMetadata create_ejMetadata()',
labelRecord = 'ejRecord create_ejRecord()',
labelEvent = 'ejEvent create_ejEvent()')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.