Skip to content

Commit

Permalink
sorvi update
Browse files Browse the repository at this point in the history
  • Loading branch information
antagomir committed Mar 3, 2017
1 parent b42a3be commit e20ff08
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions R/ropengov_storage_path.R
@@ -0,0 +1,32 @@

#' ropengov_storage_path
#'
#' @param x Characted string key defining which storage path
#' is requested.
#'
#' Return:
#' @return URL for Louhos data
#'
#' @examples url <- ropengov_storage_path("mml")
#'
#' @export
#' @references
#' See citation("sorvi")
#' @author Leo Lahti \email{louhos@@googlegroups.com}
#' @keywords utilities
ropengov_storage_path <- function(x) {
# Louhos data is stored in Github avoindata repo:
# https://github.com/avoindata/
storage_paths <- list(
"mml" = "https://github.com/avoindata/mml/blob/master/rdata/",
"louhos" = "https://github.com/avoindata/louhos/blob/master/"
)
if (x %in% names(storage_paths)) {
storage_path <- storage_paths[x]
} else {
stop("x is not a suitable key to stored paths: ",
paste(names(storage_paths), collapse = ", "))
}
return(storage_path)
}

0 comments on commit e20ff08

Please sign in to comment.