From b4ccb6450e94480a75205ec07901c26c0874a8a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 5 Nov 2024 15:46:49 +0100 Subject: [PATCH] docs: description and safer example for layer_attribute_inspect() --- R/layer_attributes.R | 7 ++++--- man/layer_attribute_inspect.Rd | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/R/layer_attributes.R b/R/layer_attributes.R index 5ef6365..45d8975 100644 --- a/R/layer_attributes.R +++ b/R/layer_attributes.R @@ -98,6 +98,9 @@ layer_attributes_get_names <- function(wfs = NULL, #' Inspect layer attributes #' +#' Summary of individual variable (attribute) in a dataset (layer) from a +#' data source (service). +#' #' @inheritParams layer_attributes_summarise #' @param attribute character string, name of layer attribute (variable). Use #' [layer_attributes_get_names()] to get layer attribute names. @@ -109,15 +112,13 @@ layer_attributes_get_names <- function(wfs = NULL, #' factor or character variable levels or unique values. #' @export #' -#' @examples -#' \dontrun{ +#' @examplesIf interactive() #' wfs <- emodnet_init_wfs_client(service = "biology") #' layer_attributes_get_names(wfs, layer = "mediseh_zostera_m_pnt") #' layer_attribute_inspect( #' wfs, layer = "mediseh_zostera_m_pnt", #' attribute = "country" #' ) -#' } layer_attribute_inspect <- function(wfs = NULL, service = NULL, service_version = NULL, diff --git a/man/layer_attribute_inspect.Rd b/man/layer_attribute_inspect.Rd index a62d2a2..6197714 100644 --- a/man/layer_attribute_inspect.Rd +++ b/man/layer_attribute_inspect.Rd @@ -34,15 +34,16 @@ useful for inspecting factor or character variable levels or unique values. } \description{ -Inspect layer attributes +Summary of individual variable (attribute) in a dataset (layer) from a +data source (service). } \examples{ -\dontrun{ +\dontshow{if (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( wfs, layer = "mediseh_zostera_m_pnt", attribute = "country" ) -} +\dontshow{\}) # examplesIf} }