sbitem | R Documentation |
ScienceBase item class
as.sbitem(x, ...)
## Default S3 method:
as.sbitem(x, ...)
is.sbitem(x)
x |
Input, variety of things, character, list, or sbitem class object |
... |
Further args passed on to |
# Single item from item_get()
item_get("4f4e4b24e4b07f02db6aea14")
# Get many w/ e.g., an lapply() call
library("httr")
res <- query_items(list(s = "Search", q = "water", format = "json"))
if(res$status != 404) {
ids <- vapply(httr::content(res)$items, "[[", "", "id")
(out <- lapply(ids[1:3], item_get))
}
# create item class from only an item ID
as.sbitem("4f4e4b24e4b07f02db6aea14")
# sbitem gives back itself
(x <- as.sbitem("4f4e4b24e4b07f02db6aea14"))
as.sbitem(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.