ckanr (version 0.3.0)

as.ckan_related: ckan_related class helpers

Description

ckan_related class helpers

Usage

as.ckan_related(x, ...)

is.ckan_related(x)

Arguments

x

Variety of things, character, list, or ckan_related class object

...

Further args passed on to related_show if character given

Examples

Run this code
# NOT RUN {
ckanr_setup(url = "https://demo.ckan.org/", key = getOption("ckan_demo_key"))

(x <- package_create("foobbbbbarrrr") %>%
   related_create(title = "my resource",
                  type = "visualization"))

# create item class from only an item ID
as.ckan_related(x$id)

# gives back itself
(x <- as.ckan_related(x$id))
as.ckan_related(x)
# }

Run the code above in your browser using DataLab