diff --git a/R/client.R b/R/client.R index c66006c..a08daf0 100644 --- a/R/client.R +++ b/R/client.R @@ -15,7 +15,7 @@ #' @export #' #' @seealso `WFSClient` in package `ows4R`. -#' @examplesIf interactive() +#' @examplesIf identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive() #' wfs <- emodnet_init_wfs_client(service = "bathymetry") emodnet_init_wfs_client <- function(service, service_version = NULL, diff --git a/R/emodnet_wfs.R b/R/emodnet_wfs.R index 7c2f544..b36bcce 100644 --- a/R/emodnet_wfs.R +++ b/R/emodnet_wfs.R @@ -10,7 +10,7 @@ #' #' @return Tibble of available EMODnet Web Feature Services #' -#' @examplesIf interactive() +#' @examplesIf identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive() #' emodnet_wfs() #' @export emodnet_wfs <- memoise::memoise(.emodnet_wfs) diff --git a/R/info.R b/R/info.R index e54abfb..19066b1 100644 --- a/R/info.R +++ b/R/info.R @@ -91,7 +91,7 @@ emodnet_get_layer_info <- memoise::memoise(.emodnet_get_layer_info) #' @export #' @describeIn emodnet_get_wfs_info Get info on all layers from #' an EMODnet WFS service. -#' @examplesIf interactive() +#' @examplesIf identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive() #' emodnet_get_wfs_info(service = "bathymetry") #' # Query a wfs object #' wfs_bio <- emodnet_init_wfs_client("biology") diff --git a/R/layer_attributes.R b/R/layer_attributes.R index aa72b5f..511431d 100644 --- a/R/layer_attributes.R +++ b/R/layer_attributes.R @@ -10,7 +10,7 @@ #' @family attributes #' @export #' -#' @examplesIf interactive() +#' @examplesIf identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive() #' layer_attributes_summarise( #' service = "biology", #' layer = "mediseh_zostera_m_pnt" @@ -44,7 +44,7 @@ layer_attributes_summarise <- function(wfs = NULL, #' @family attributes #' @export #' -#' @examplesIf interactive() +#' @examplesIf identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive() #' layer_attribute_descriptions( #' service = "biology", #' layer = "mediseh_zostera_m_pnt" @@ -76,7 +76,7 @@ layer_attribute_descriptions <- function(wfs = NULL, #' @return character vector of layer attribute (variable) names. #' @export #' -#' @examplesIf interactive() +#' @examplesIf identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive() #' layer_attributes_get_names( #' service = "biology", #' layer = "mediseh_zostera_m_pnt" @@ -114,7 +114,7 @@ layer_attributes_get_names <- function(wfs = NULL, #' @family attributes #' @export #' -#' @examplesIf interactive() +#' @examplesIf identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive() #' wfs <- emodnet_init_wfs_client(service = "biology") #' layer_attributes_get_names(wfs, layer = "mediseh_zostera_m_pnt") #' layer_attribute_inspect( @@ -183,7 +183,7 @@ layer_attribute_inspect <- function(wfs = NULL, #' @family attributes #' @export #' -#' @examplesIf interactive() +#' @examplesIf identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive() #' layer_attributes_tbl(service = "biology", layer = "mediseh_zostera_m_pnt") layer_attributes_tbl <- function(wfs = NULL, service = NULL, diff --git a/R/layers.R b/R/layers.R index bc4633f..cc9ba76 100644 --- a/R/layers.R +++ b/R/layers.R @@ -41,7 +41,7 @@ #' an `sf` out of a single layer request instead of a list of length 1. #' @export #' -#' @examplesIf interactive() +#' @examplesIf identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive() #' # Layers as character vector #' emodnet_get_layers( #' service = "biology", diff --git a/man/emodnet_get_layers.Rd b/man/emodnet_get_layers.Rd index 0d6319c..37b1cce 100644 --- a/man/emodnet_get_layers.Rd +++ b/man/emodnet_get_layers.Rd @@ -85,7 +85,7 @@ you might consider a combination of these ideas: } \examples{ -\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} # Layers as character vector emodnet_get_layers( service = "biology", diff --git a/man/emodnet_get_wfs_info.Rd b/man/emodnet_get_wfs_info.Rd index 03d08cf..fd74a03 100644 --- a/man/emodnet_get_wfs_info.Rd +++ b/man/emodnet_get_wfs_info.Rd @@ -56,7 +56,7 @@ services from server. }} \examples{ -\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} emodnet_get_wfs_info(service = "bathymetry") # Query a wfs object wfs_bio <- emodnet_init_wfs_client("biology") diff --git a/man/emodnet_init_wfs_client.Rd b/man/emodnet_init_wfs_client.Rd index 6e96241..2bf45c7 100644 --- a/man/emodnet_init_wfs_client.Rd +++ b/man/emodnet_init_wfs_client.Rd @@ -25,7 +25,7 @@ OGC Web Feature Service. Initialise an EMODnet WFS client } \examples{ -\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} wfs <- emodnet_init_wfs_client(service = "bathymetry") \dontshow{\}) # examplesIf} } diff --git a/man/emodnet_wfs.Rd b/man/emodnet_wfs.Rd index 0f85e1f..f24ee1a 100644 --- a/man/emodnet_wfs.Rd +++ b/man/emodnet_wfs.Rd @@ -13,7 +13,7 @@ Tibble of available EMODnet Web Feature Services Available EMODnet Web Feature Services } \examples{ -\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} emodnet_wfs() \dontshow{\}) # examplesIf} } diff --git a/man/layer_attribute_descriptions.Rd b/man/layer_attribute_descriptions.Rd index c7e032f..92c4393 100644 --- a/man/layer_attribute_descriptions.Rd +++ b/man/layer_attribute_descriptions.Rd @@ -31,7 +31,7 @@ data.frame containing layer attribute descriptions (metadata). Get layer attribute description } \examples{ -\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} layer_attribute_descriptions( service = "biology", layer = "mediseh_zostera_m_pnt" diff --git a/man/layer_attribute_inspect.Rd b/man/layer_attribute_inspect.Rd index 2e559c5..cbdd94a 100644 --- a/man/layer_attribute_inspect.Rd +++ b/man/layer_attribute_inspect.Rd @@ -38,7 +38,7 @@ factor or character variable levels or unique values. Inspect layer attributes } \examples{ -\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} wfs <- emodnet_init_wfs_client(service = "biology") layer_attributes_get_names(wfs, layer = "mediseh_zostera_m_pnt") layer_attribute_inspect( diff --git a/man/layer_attributes_get_names.Rd b/man/layer_attributes_get_names.Rd index 5ee0f35..a12cb6d 100644 --- a/man/layer_attributes_get_names.Rd +++ b/man/layer_attributes_get_names.Rd @@ -33,7 +33,7 @@ Names of variables (attributes) available from a dataset (layer) in a data source (service). } \examples{ -\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} layer_attributes_get_names( service = "biology", layer = "mediseh_zostera_m_pnt" diff --git a/man/layer_attributes_summarise.Rd b/man/layer_attributes_summarise.Rd index fc73e41..8222c77 100644 --- a/man/layer_attributes_summarise.Rd +++ b/man/layer_attributes_summarise.Rd @@ -32,7 +32,7 @@ for a given service. Get summaries of layer attributes (variables) } \examples{ -\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} layer_attributes_summarise( service = "biology", layer = "mediseh_zostera_m_pnt" diff --git a/man/layer_attributes_tbl.Rd b/man/layer_attributes_tbl.Rd index 3cd6952..ba65be6 100644 --- a/man/layer_attributes_tbl.Rd +++ b/man/layer_attributes_tbl.Rd @@ -35,7 +35,7 @@ for more targeted and faster layer download. } \examples{ -\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} layer_attributes_tbl(service = "biology", layer = "mediseh_zostera_m_pnt") \dontshow{\}) # examplesIf} }