Skip to content

Instantly share code, notes, and snippets.

@sckott
Created January 5, 2015 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sckott/c86f3c2965cfc389ac3c to your computer and use it in GitHub Desktop.
Save sckott/c86f3c2965cfc389ac3c to your computer and use it in GitHub Desktop.

New way to set base urls in ckanr

Installation, loading

install.packages("devtools")
devtools::install_github("ropensci/ckanr")
library("ckanr")

Usage

The default base url can be retrieved with:

get_ckanr_url()
#> [1] "http://data.nhm.ac.uk"

You can change the base url for the session (this isn't preserved across R sessions) by

set_ckanr_url("http://data.nhm.ac.uk")

Now check to see that it's changed

get_ckanr_url()
#> [1] "http://data.nhm.ac.uk"

You can still set the url in each function call if you want via the url parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment