Skip to content

Commit

Permalink
Removed donttest
Browse files Browse the repository at this point in the history
  • Loading branch information
MansMeg committed Mar 3, 2015
1 parent 7672eb5 commit 1f4ff58
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 78 deletions.
4 changes: 0 additions & 4 deletions R/get_pxweb_levels.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 0 additions & 7 deletions R/get_pxweb_metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion R/interactive_pxweb.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
#' }

Expand Down
3 changes: 0 additions & 3 deletions R/pxweb_api_class.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 <-
Expand Down
4 changes: 0 additions & 4 deletions R/test_pxweb_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -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())){
Expand Down
20 changes: 0 additions & 20 deletions R/utils_internal.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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){
Expand Down
5 changes: 0 additions & 5 deletions man/calculate_data_dim.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

15 changes: 0 additions & 15 deletions man/create_batch_list.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

5 changes: 0 additions & 5 deletions man/get_pxweb_levels.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
}
}

5 changes: 0 additions & 5 deletions man/get_pxweb_metadata.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

1 change: 0 additions & 1 deletion man/interactive_pxweb.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
Expand Down
3 changes: 0 additions & 3 deletions man/pxweb_api-class.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

5 changes: 0 additions & 5 deletions man/test_pxweb_api.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

0 comments on commit 1f4ff58

Please sign in to comment.