diff --git a/R/dwca.R b/R/dwca.R index 3c855c6..ba6631a 100644 --- a/R/dwca.R +++ b/R/dwca.R @@ -19,6 +19,7 @@ #' won't invoke the caching route, but will go directly to the file/directory. #' #' @examples +#' \dontrun{ #' # set up a temporary directory for the example #' dwca_cache$cache_path_set(path = "finch", type = "tempdir") #' @@ -31,7 +32,6 @@ #' x$dataset_meta[[1]] #' x$data #' -#' \dontrun{ #' # Read data #' (x <- dwca_read(dir, read=TRUE)) #' head(x$data[[1]]) diff --git a/R/simple.R b/R/simple.R index 7513b38..4169f22 100644 --- a/R/simple.R +++ b/R/simple.R @@ -13,6 +13,7 @@ #' position rather than name since duplicate names are allowed in chunks. #' #' @examples +#' \dontrun{ #' # SimpleDarwinRecordSet examples #' file <- system.file("examples", "example_simple.xml", package = "finch") #' simple_read(file) @@ -39,6 +40,7 @@ #' res$locations #' ## chunks, the first one #' res$chunks[[1]] +#' } simple_read <- function(file) { if (!file.exists(file)) stop("file does not exist", call. = FALSE) xml <- read_xml(file) diff --git a/man/dwca_read.Rd b/man/dwca_read.Rd index e85bfca..1c52e6a 100644 --- a/man/dwca_read.Rd +++ b/man/dwca_read.Rd @@ -29,6 +29,7 @@ pull from the cache. Passing a file or directory on your local system won't invoke the caching route, but will go directly to the file/directory. } \examples{ +\dontrun{ # set up a temporary directory for the example dwca_cache$cache_path_set(path = "finch", type = "tempdir") @@ -41,7 +42,6 @@ x$highmeta x$dataset_meta[[1]] x$data -\dontrun{ # Read data (x <- dwca_read(dir, read=TRUE)) head(x$data[[1]]) diff --git a/man/simple_read.Rd b/man/simple_read.Rd index 08abc54..06bd89f 100644 --- a/man/simple_read.Rd +++ b/man/simple_read.Rd @@ -24,6 +24,7 @@ Make sure when reading a DarwinRecordSet to access the chunks by position rather than name since duplicate names are allowed in chunks. } \examples{ +\dontrun{ # SimpleDarwinRecordSet examples file <- system.file("examples", "example_simple.xml", package = "finch") simple_read(file) @@ -51,3 +52,4 @@ res$locations ## chunks, the first one res$chunks[[1]] } +}