lines = readLines("vignettes/openrouteservice.Rmd") ids = grep("<!-- README (START|END) -->", lines) + c(1, -1) readme = lines[do.call(":", as.list(ids))] readme = gsub("^#(#+)(.*)", "\\1\\2", readme) cat(knitr::knit_child(text=readme, quiet=TRUE))
See the package vignette for an overview of the offered functionality.
The default is to fire any requests against the free public services at
options(openrouteservice.url = "http://localhost:8082/ors")
If necessary, endpoint configuration can be further customized through
openrouteservice.paths
which specifies a named list of paths. The defaults are
equivalent of having
opts_str <- "options(openrouteservice.paths = %s)" nch <- nchar(opts_str) + 1L ors_paths <- unlist(strsplit(deparse(openrouteservice:::ors_path(), 500L), ",")) indent <- paste0(rep(" ", nch), collapse="") cat(sprintf(opts_str, paste0(ors_paths, collapse = paste(",", indent, sep="\n")))) options(openrouteservice.path = list(directions = "v2/directions"))
lines = readLines("NEWS.md") lines = gsub("^# openrouteservice (.*)", "# version \\1", lines) versions = grep("^# ", lines) ## select only n latest news n = 4 from = 1 to = if (length(versions) > n) versions[n+1]-1 else length(lines) news = lines[from:to] news = gsub("^(#+)(.*)", "##\\1\\2", news) cat(paste(news, collapse = "\n"))
Please feel free to reach out if you would like to have your work added to the list below.
lines = readLines("references.md") lines = gsub('^<span class="csl-left-margin">', '', lines) lines = gsub('^</span><span class="csl-right-inline">', '', lines) lines = gsub(' </span>$', '', lines) cat(paste(lines, collapse = "\n"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.