knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
schemar provides experimental constructor functions to create schema.org objects.
You can install schemar from github with:
# install.packages("devtools") devtools::install_github("cboettig/schemar")
Construct a http://schema.org/Thing:
library(schemar) x <- Thing(url = "http://schema.org") write_jsonld(x, "example.json")
The main purpose of the package is to take advantage of tab completion and built-in documentation. For instance, typing schemar::P
and hitting tab, we see a list of all possible object types (classes) starting with P
. Typing a full class, such as schema::Place(
and hitting tab, we see a list of possible properties for Place
. The manual entry, ?Place
, shows the definitions for each of these properties, along with there expected types.
Please note that this project is released with a Contributor Code of Conduct.
By participating in this project you agree to abide by its terms.
unlink("example.json")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.