From 1f4ff58699d9aefd7174032bbdba93f022fbc337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Magnusson?= Date: Tue, 3 Mar 2015 15:44:53 +0100 Subject: [PATCH] Removed donttest --- R/get_pxweb_levels.R | 4 ---- R/get_pxweb_metadata.R | 7 ------- R/interactive_pxweb.R | 1 - R/pxweb_api_class.R | 3 --- R/test_pxweb_api.R | 4 ---- R/utils_internal.R | 20 -------------------- man/calculate_data_dim.Rd | 5 ----- man/create_batch_list.Rd | 15 --------------- man/get_pxweb_levels.Rd | 5 ----- man/get_pxweb_metadata.Rd | 5 ----- man/interactive_pxweb.Rd | 1 - man/pxweb_api-class.Rd | 3 --- man/test_pxweb_api.Rd | 5 ----- 13 files changed, 78 deletions(-) diff --git a/R/get_pxweb_levels.R b/R/get_pxweb_levels.R index 1d515a09..34eb3d0b 100644 --- a/R/get_pxweb_levels.R +++ b/R/get_pxweb_levels.R @@ -7,10 +7,6 @@ #' @param quiet Quiet mode. Whether to stop with an error if the input node does not contain any subnodes. If set to \code{TRUE}, the function will quietly return FALSE without any errors. (default: \code{FALSE}) #' @param ... further argument to send to \code{get_pxweb_metadata} #' @export -#' @examples -#' \donttest{ -#' topnode_levels <- get_pxweb_levels(baseURL = base_url("api.scb.se", "v1", "sv")) -#' } get_pxweb_levels <- function( baseURL, diff --git a/R/get_pxweb_metadata.R b/R/get_pxweb_metadata.R index 22e5ef7a..1bf60a48 100644 --- a/R/get_pxweb_metadata.R +++ b/R/get_pxweb_metadata.R @@ -11,13 +11,6 @@ #' @export #' @examples #' api_url <- base_url("api.scb.se", language = "sv") -#' \donttest{ -#' top_node <- get_pxweb_metadata(api_url) -#' -#' bottom_node <- get_pxweb_metadata("http://api.scb.se/OV0104/v1/doris/sv/ssd/AM/AM0114/LCIArbKv") -#' } - - get_pxweb_metadata <- function(path = NULL, node = NULL, topnodes = NULL, quiet = TRUE, baseURL = NULL, ...) { # Build a URL if no path is supplied diff --git a/R/interactive_pxweb.R b/R/interactive_pxweb.R index 49d755ad..f09c2fef 100644 --- a/R/interactive_pxweb.R +++ b/R/interactive_pxweb.R @@ -17,7 +17,6 @@ #' \donttest{ #' d <- interactive_pxweb() #' d <- interactive_pxweb("api.scb.se") -#' d <- interactive_pxweb(api = "statistik.sjv.se") #' d <- interactive_pxweb("api.scb.se", language = "sv") #' } diff --git a/R/pxweb_api_class.R b/R/pxweb_api_class.R index ee8bdb18..3d4278c4 100644 --- a/R/pxweb_api_class.R +++ b/R/pxweb_api_class.R @@ -12,9 +12,6 @@ #' @examples #' scb_pxweb_api <- pxweb_api$new(get_api = "api.scb.se") #' scb_pxweb_api -#' \donttest{ -#' scb_pxweb_api$test_api() -#' } #' #' @export pxweb_api pxweb_api <- diff --git a/R/test_pxweb_api.R b/R/test_pxweb_api.R index d1a10aa9..b421d188 100644 --- a/R/test_pxweb_api.R +++ b/R/test_pxweb_api.R @@ -15,10 +15,6 @@ #' \code{error} : Whether there were errors encountered with the call #' \code{download_error} : Whether there were errors encountered during download #' -#' @examples -#' \donttest{ -#' test_data <- test_pxweb_api(url = "http://api.scb.se/OV0104/v1/doris/sv/ssd/TK") -#' } #' @importFrom plyr rbind.fill #' test_pxweb_api <- function(url, download_all=FALSE, seed=as.integer(Sys.time())){ diff --git a/R/utils_internal.R b/R/utils_internal.R index 4e34967f..80788d57 100644 --- a/R/utils_internal.R +++ b/R/utils_internal.R @@ -109,20 +109,6 @@ api_timer <- function(api_url, calls = 1){ #' @param url The url to download from. #' @param dims The dimension object to use for downloading #' -#' @examples -#' url <- "http://api.scb.se/OV0104/v1/doris/sv/ssd/BE/BE0101/BE0101A/BefolkningNy" -#' dims <- list(Region = c('*'), Civilstand = c('*'), Alder = '1', Kon = c('*'), -#' ContentsCode = c('*'), Tid = c('*')) -#' \donttest{ -#' batches <- create_batch_list(url, dims) -#' } -#' -#' url <- "http://api.scb.se/OV0104/v1/doris/sv/ssd/PR/PR0101/PR0101E/Basbeloppet" -#' dims <- list(ContentsCode = c('*'), -#' Tid = c('*')) -#' \donttest{ -#' batches <- create_batch_list(url, dims) -#' } create_batch_list <- function(url, dims){ # Get dimension size of call @@ -211,12 +197,6 @@ get_dim_size <- function(url, dims, content_node=NULL){ #' url <- "http://api.scb.se/OV0104/v1/doris/sv/ssd/BE/BE0101/BE0101A/BefolkningNy" #' dims <- list(Region = c('*'), Civilstand = c('*'), Alder = '1', Kon = c('*'), #' ContentsCode = c('*'), Tid = c('*')) -#' \donttest{ -#' call_size <- get_dim_size(url, dims) -#' calculate_data_dim(call_size[[1]], TRUE) -#' calculate_data_dim(call_size[[1]], FALSE) -#' } - calculate_data_dim <- function(dim_length, clean){ len <- length(dim_length) if(clean){ diff --git a/man/calculate_data_dim.Rd b/man/calculate_data_dim.Rd index 4f90b54b..7f3b324c 100644 --- a/man/calculate_data_dim.Rd +++ b/man/calculate_data_dim.Rd @@ -20,10 +20,5 @@ The function calculates the dimension of a data object url <- "http://api.scb.se/OV0104/v1/doris/sv/ssd/BE/BE0101/BE0101A/BefolkningNy" dims <- list(Region = c('*'), Civilstand = c('*'), Alder = '1', Kon = c('*'), ContentsCode = c('*'), Tid = c('*')) -\donttest{ -call_size <- get_dim_size(url, dims) -calculate_data_dim(call_size[[1]], TRUE) -calculate_data_dim(call_size[[1]], FALSE) -} } diff --git a/man/create_batch_list.Rd b/man/create_batch_list.Rd index 4a8f7a49..3abc83d9 100644 --- a/man/create_batch_list.Rd +++ b/man/create_batch_list.Rd @@ -19,19 +19,4 @@ be downloaded in batches due to download limit restrictions in the pxweb api. If '*' is used it will get the numberof values for this dimension using a get_pxweb_metadata call. } -\examples{ -url <- "http://api.scb.se/OV0104/v1/doris/sv/ssd/BE/BE0101/BE0101A/BefolkningNy" -dims <- list(Region = c('*'), Civilstand = c('*'), Alder = '1', Kon = c('*'), - ContentsCode = c('*'), Tid = c('*')) -\donttest{ -batches <- create_batch_list(url, dims) -} - -url <- "http://api.scb.se/OV0104/v1/doris/sv/ssd/PR/PR0101/PR0101E/Basbeloppet" -dims <- list(ContentsCode = c('*'), - Tid = c('*')) -\donttest{ -batches <- create_batch_list(url, dims) -} -} diff --git a/man/get_pxweb_levels.Rd b/man/get_pxweb_levels.Rd index 86bb0991..0f6af1c0 100644 --- a/man/get_pxweb_levels.Rd +++ b/man/get_pxweb_levels.Rd @@ -17,9 +17,4 @@ get_pxweb_levels(baseURL, descriptions = FALSE, quiet = FALSE, ...) \description{ Get levels from a node in the API. If at the lowest node, return a warning. } -\examples{ -\donttest{ -topnode_levels <- get_pxweb_levels(baseURL = base_url("api.scb.se", "v1", "sv")) -} -} diff --git a/man/get_pxweb_metadata.Rd b/man/get_pxweb_metadata.Rd index 5941403e..732cba3e 100644 --- a/man/get_pxweb_metadata.Rd +++ b/man/get_pxweb_metadata.Rd @@ -24,10 +24,5 @@ Get data from the API. If at the lowest node, provide the user with a friendly m } \examples{ api_url <- base_url("api.scb.se", language = "sv") -\donttest{ -top_node <- get_pxweb_metadata(api_url) - -bottom_node <- get_pxweb_metadata("http://api.scb.se/OV0104/v1/doris/sv/ssd/AM/AM0114/LCIArbKv") -} } diff --git a/man/interactive_pxweb.Rd b/man/interactive_pxweb.Rd index 1481568e..9b4bd016 100644 --- a/man/interactive_pxweb.Rd +++ b/man/interactive_pxweb.Rd @@ -25,7 +25,6 @@ api_catalogue() # List apis \donttest{ d <- interactive_pxweb() d <- interactive_pxweb("api.scb.se") - d <- interactive_pxweb(api = "statistik.sjv.se") d <- interactive_pxweb("api.scb.se", language = "sv") } } diff --git a/man/pxweb_api-class.Rd b/man/pxweb_api-class.Rd index 0ed16071..d28a4b26 100644 --- a/man/pxweb_api-class.Rd +++ b/man/pxweb_api-class.Rd @@ -61,8 +61,5 @@ api_name.} \examples{ scb_pxweb_api <- pxweb_api$new(get_api = "api.scb.se") scb_pxweb_api - \donttest{ - scb_pxweb_api$test_api() - } } diff --git a/man/test_pxweb_api.Rd b/man/test_pxweb_api.Rd index 599a6b4f..9ac56bd6 100644 --- a/man/test_pxweb_api.Rd +++ b/man/test_pxweb_api.Rd @@ -23,9 +23,4 @@ Two variables are added: The function can be used to test a whole pxweb api by using the api base url. By using a branch in a tree the api is tested below this branch. } -\examples{ -\donttest{ -test_data <- test_pxweb_api(url = "http://api.scb.se/OV0104/v1/doris/sv/ssd/TK") -} -}