# NOT RUN {
# Setup
ckanr_setup(url = "https://demo.ckan.org/", key = getOption("ckan_demo_key"))
# create a package
(res <- package_create("foobarrrr", author="Jane Doe"))
# then create a resource
file <- system.file("examples", "actinidiaceae.csv", package = "ckanr")
(xx <- resource_create(package_id = res$id,
description = "my resource",
name = "bears",
upload = file,
rcurl = "http://google.com"
))
package_create("foobbbbbarrrr") %>%
resource_create(description = "my resource",
name = "bearsareus",
upload = file,
rcurl = "http://google.com")
# }
Run the code above in your browser using DataCamp Workspace