Skip to content

Commit

Permalink
docs: better manual pages for attributes related functions
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Nov 5, 2024
1 parent b4ccb64 commit 72240bf
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 16 deletions.
24 changes: 14 additions & 10 deletions R/layer_attributes.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@
#'
#' @return output of `summary()` on the attributes (variables) in a given layer
#' for a given service.
#' @family attributes
#' @export
#'
#' @examples
#' \dontrun{
#' @examplesIf interactive
#' layer_attributes_summarise(
#' service = "biology",
#' layer = "mediseh_zostera_m_pnt"
#' )
#' }
layer_attributes_summarise <- function(wfs = NULL,
service = NULL,
service_version = NULL,
Expand All @@ -42,6 +41,7 @@ layer_attributes_summarise <- function(wfs = NULL,
#' @inheritParams layer_attributes_summarise
#'
#' @return data.frame containing layer attribute descriptions (metadata).
#' @family attributes
#' @export
#'
#' @examplesIf interactive()
Expand All @@ -64,22 +64,23 @@ layer_attribute_descriptions <- function(wfs = NULL,
}


#' Get names of layer attributes
#' Names of variables (attributes) available from a dataset (layer)
#' in a data source (service).
#'
#' @inheritParams emodnet_init_wfs_client
#' @inheritParams emodnet_get_wfs_info
#' @inheritParams layer_attributes_summarise
#'
#' @family attributes
#'
#' @return character vector of layer attribute (variable) names.
#' @export
#'
#' @examples
#' \dontrun{
#' @examplesIf interactive()
#' layer_attributes_get_names(
#' service = "biology",
#' layer = "mediseh_zostera_m_pnt"
#' )
#' }
layer_attributes_get_names <- function(wfs = NULL,
service = NULL,
service_version = NULL,
Expand Down Expand Up @@ -110,6 +111,7 @@ layer_attributes_get_names <- function(wfs = NULL,
#' @return Detailed summary of individual attribute (variable). Particularly
#' useful for inspecting
#' factor or character variable levels or unique values.
#' @family attributes
#' @export
#'
#' @examplesIf interactive()
Expand Down Expand Up @@ -164,6 +166,9 @@ layer_attribute_inspect <- function(wfs = NULL,

#' Get layer attribute values tibble
#'
#' Possible values of variables (attributes) in a dataset (layer)
#' from a data source (service).
#'
#' @inheritParams emodnet_init_wfs_client
#' @inheritParams emodnet_get_wfs_info
#' @inheritParams layer_attributes_summarise
Expand All @@ -175,12 +180,11 @@ layer_attribute_inspect <- function(wfs = NULL,
#' useful for inspecting attribute values and constructing feature filters
#' for more
#' targeted and faster layer download.
#' @family attributes
#' @export
#'
#' @examples
#' \dontrun{
#' @examplesIf interactive()
#' layer_attributes_tbl(service = "biology", layer = "mediseh_zostera_m_pnt")
#' }
layer_attributes_tbl <- function(wfs = NULL,
service = NULL,
service_version = NULL, layer) {
Expand Down
8 changes: 8 additions & 0 deletions man/layer_attribute_descriptions.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions man/layer_attribute_inspect.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 13 additions & 3 deletions man/layer_attributes_get_names.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion man/layer_attributes_summarise.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions man/layer_attributes_tbl.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 72240bf

Please sign in to comment.