# NOT RUN {
# Setup
ckanr_setup(url = "https://demo.ckan.org/", key = Sys.getenv("CKAN_DEMO_KEY"))
# create a package
(res <- package_create("yellow9"))
# then create a resource
file <- system.file("examples", "actinidiaceae.csv", package = "ckanr")
(xx <- resource_create(res,
description = "my resource",
name = "bears",
upload = file,
rcurl = "http://google.com"
))
# delete the resource
resource_delete(xx)
# }
Run the code above in your browser using DataLab