From b99ddb862693adc8b3aac270c099c61b14745442 Mon Sep 17 00:00:00 2001 From: Vries Date: Tue, 17 Jan 2023 22:03:36 +0100 Subject: [PATCH] Fixes after CRAN checks --- DESCRIPTION | 12 ++++++------ R/copernicus_cite_product.r | 2 +- R/copernicus_product_details.r | 4 ++-- R/copernicus_product_metadata.r | 2 +- R/copernicus_products_list.r | 2 +- R/ftp.r | 2 +- R/imports.r | 5 ++++- R/wms.r | 8 ++++---- man/addCopernicusWMSTiles.Rd | 2 +- man/copernicus_cite_product.Rd | 2 +- man/copernicus_ftp.Rd | 4 ++-- man/copernicus_product_details.Rd | 2 +- man/copernicus_product_metadata.Rd | 2 +- man/copernicus_product_services.Rd | 2 +- man/copernicus_products_list.Rd | 2 +- man/copernicus_wms2geotiff.Rd | 2 +- man/copernicus_wms_details.Rd | 2 +- man/reexports.Rd | 7 ++++++- 18 files changed, 36 insertions(+), 28 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 016e8d6..25fd2f9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,18 +1,18 @@ Package: CopernicusMarine Type: Package Title: Search Download and Handle Data from Copernicus Marine Service Information -Version: 0.0.2 -Date: 2023-01-16 +Version: 0.0.3 +Date: 2023-01-17 Authors@R: c(person("Pepijn", "de Vries", role = c("aut", "cre", "dtc"), email = "pepijn.devries@outlook.com", comment = c(ORCID = "0000-0002-7961-6646"))) Author: Pepijn de Vries [aut, cre, dtc] (0000-0002-7961-6646) Maintainer: Pepijn de Vries -Description: Subset and download marine data from EU Copernicus - Marine Service Information. Import data on the oceans - physical and biogeochemical state from Copernicus into R - without the need of external software. +Description: Subset and download data from EU Copernicus Marine + Service Information: . + Import data on the oceans physical and biogeochemical state + from Copernicus into R without the need of external software. Depends: R (>= 3.5.0) Imports: diff --git a/R/copernicus_cite_product.r b/R/copernicus_cite_product.r index 369f676..4044e2a 100644 --- a/R/copernicus_cite_product.r +++ b/R/copernicus_cite_product.r @@ -10,7 +10,7 @@ #' @name copernicus_cite_product #' @family product-functions #' @examples -#' \dontrun{ +#' \donttest{ #' copernicus_cite_product("SST_MED_PHY_SUBSKIN_L4_NRT_010_036") #' } #' @author Pepijn de Vries diff --git a/R/copernicus_product_details.r b/R/copernicus_product_details.r index b2cbfd5..a151acf 100644 --- a/R/copernicus_product_details.r +++ b/R/copernicus_product_details.r @@ -9,7 +9,7 @@ #' @name copernicus_product_details #' @family product-functions #' @examples -#' \dontrun{ +#' \donttest{ #' copernicus_product_details("GLOBAL_ANALYSISFORECAST_PHY_001_024") #' #' copernicus_product_details( @@ -46,7 +46,7 @@ copernicus_product_details <- function(product, layer, variable) { #' @rdname copernicus_product_services #' @name copernicus_product_services #' @examples -#' \dontrun{ +#' \donttest{ #' copernicus_product_services("GLOBAL_ANALYSISFORECAST_PHY_001_024") #' } #' @author Pepijn de Vries diff --git a/R/copernicus_product_metadata.r b/R/copernicus_product_metadata.r index 16e8def..9e9fe3f 100644 --- a/R/copernicus_product_metadata.r +++ b/R/copernicus_product_metadata.r @@ -9,7 +9,7 @@ #' @name copernicus_product_metadata #' @family product-functions #' @examples -#' \dontrun{ +#' \donttest{ #' copernicus_product_metadata("GLOBAL_ANALYSISFORECAST_PHY_001_024") #' } #' @author Pepijn de Vries diff --git a/R/copernicus_products_list.r b/R/copernicus_products_list.r index 78b3c41..2fb9f93 100644 --- a/R/copernicus_products_list.r +++ b/R/copernicus_products_list.r @@ -13,7 +13,7 @@ #' @name copernicus_products_list #' @family product-functions #' @examples -#' \dontrun{ +#' \donttest{ #' copernicus_products_list() #' #' ## Query a specific product: diff --git a/R/ftp.r b/R/ftp.r index d37f3cb..2cc3c4a 100644 --- a/R/ftp.r +++ b/R/ftp.r @@ -79,7 +79,7 @@ copernicus_ftp_list <- function( #' @name copernicus_ftp_get #' @export copernicus_ftp_get <- function( - url, destination, show_progress = T, overwrite = F, + url, destination, show_progress = TRUE, overwrite = FALSE, username = getOption("CopernicusMarine_uid", ""), password = getOption("CopernicusMarine_pwd", "")) { if (!dir.exists(destination)) stop("'destination' either doesn't exist or is not a directory!") diff --git a/R/imports.r b/R/imports.r index 38bb40b..159aebd 100644 --- a/R/imports.r +++ b/R/imports.r @@ -3,9 +3,12 @@ #' Objects imported and exported from other packages. See original documentation for more details. #' #' \describe{ -#' \item{dplyr}{[`\%>\%()`][dplyr::reexports]} +#' \item{dplyr pipe operator}{[`%>%`][dplyr::reexports]} #' } #' @importFrom dplyr %>% +#' @return Returns the result of the function call on the right-hand side of the pipe operator. +#' The left-hand side is used as first argument to the call to the right-hand side. For +#' more details see [dplyr::reexports]. #' @export %>% #' @name %>% #' @rdname reexports diff --git a/R/wms.r b/R/wms.r index 61a175e..d54b7ac 100644 --- a/R/wms.r +++ b/R/wms.r @@ -8,7 +8,7 @@ #' @name copernicus_wms_details #' @family wms-functions #' @examples -#' \dontrun{ +#' \donttest{ #' copernicus_wms_details( #' product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", #' layer = "cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m", @@ -20,7 +20,7 @@ copernicus_wms_details <- function(product, layer, variable) { product_details <- copernicus_product_details(product, layer, variable) - copwmsinfo <- sf::gdal_utils("info", paste0("WMS:", product_details$wmsUrl), quiet = T) + copwmsinfo <- sf::gdal_utils("info", paste0("WMS:", product_details$wmsUrl), quiet = TRUE) desc <- copwmsinfo %>% stringr::str_match_all("SUBDATASET_(\\d)_DESC=(.*?)\n") desc <- desc[[1]][,3] @@ -43,7 +43,7 @@ copernicus_wms_details <- function(product, layer, variable) { #' @name addCopernicusWMSTiles #' @family wms-functions #' @examples -#' \dontrun{ +#' \donttest{ #' leaflet::leaflet() %>% #' leaflet::setView(lng = 3, lat = 54, zoom = 4) %>% #' leaflet::addProviderTiles("Esri.WorldImagery") %>% @@ -85,7 +85,7 @@ addCopernicusWMSTiles <- function(map, product, layer, variable, #' @name copernicus_wms2geotiff #' @family wms-functions #' @examples -#' \dontrun{ +#' \donttest{ #' destination <- tempfile("wms", fileext = ".tiff") #' copernicus_wms2geotiff( #' product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", diff --git a/man/addCopernicusWMSTiles.Rd b/man/addCopernicusWMSTiles.Rd index b0f910a..c42a6e7 100644 --- a/man/addCopernicusWMSTiles.Rd +++ b/man/addCopernicusWMSTiles.Rd @@ -37,7 +37,7 @@ Returns an updated \code{map} to it. } \examples{ -\dontrun{ +\donttest{ leaflet::leaflet() \%>\% leaflet::setView(lng = 3, lat = 54, zoom = 4) \%>\% leaflet::addProviderTiles("Esri.WorldImagery") \%>\% diff --git a/man/copernicus_cite_product.Rd b/man/copernicus_cite_product.Rd index 8ced4a7..62e1f52 100644 --- a/man/copernicus_cite_product.Rd +++ b/man/copernicus_cite_product.Rd @@ -19,7 +19,7 @@ listed at Copernicus. Note that the citing formatting does not appear to be stan \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} Get details for properly citing a Copernicus product. } \examples{ -\dontrun{ +\donttest{ copernicus_cite_product("SST_MED_PHY_SUBSKIN_L4_NRT_010_036") } } diff --git a/man/copernicus_ftp.Rd b/man/copernicus_ftp.Rd index 3fd9109..402b7cd 100644 --- a/man/copernicus_ftp.Rd +++ b/man/copernicus_ftp.Rd @@ -15,8 +15,8 @@ copernicus_ftp_list( copernicus_ftp_get( url, destination, - show_progress = T, - overwrite = F, + show_progress = TRUE, + overwrite = FALSE, username = getOption("CopernicusMarine_uid", ""), password = getOption("CopernicusMarine_pwd", "") ) diff --git a/man/copernicus_product_details.Rd b/man/copernicus_product_details.Rd index c36d7e5..a696070 100644 --- a/man/copernicus_product_details.Rd +++ b/man/copernicus_product_details.Rd @@ -23,7 +23,7 @@ Returns a named \code{list} with properties of the requested product. narrowed down to specific layers and/or variables within the product. } \examples{ -\dontrun{ +\donttest{ copernicus_product_details("GLOBAL_ANALYSISFORECAST_PHY_001_024") copernicus_product_details( diff --git a/man/copernicus_product_metadata.Rd b/man/copernicus_product_metadata.Rd index c91cbc8..fe2fae7 100644 --- a/man/copernicus_product_metadata.Rd +++ b/man/copernicus_product_metadata.Rd @@ -18,7 +18,7 @@ Returns a named \code{list} with info about the requested \code{product}. for specific Copernicus marine products } \examples{ -\dontrun{ +\donttest{ copernicus_product_metadata("GLOBAL_ANALYSISFORECAST_PHY_001_024") } } diff --git a/man/copernicus_product_services.Rd b/man/copernicus_product_services.Rd index ba82df7..64752fe 100644 --- a/man/copernicus_product_services.Rd +++ b/man/copernicus_product_services.Rd @@ -19,7 +19,7 @@ Copernicus marine product for a specific marine product. } \examples{ -\dontrun{ +\donttest{ copernicus_product_services("GLOBAL_ANALYSISFORECAST_PHY_001_024") } } diff --git a/man/copernicus_products_list.Rd b/man/copernicus_products_list.Rd index d7a03bf..c93deb5 100644 --- a/man/copernicus_products_list.Rd +++ b/man/copernicus_products_list.Rd @@ -22,7 +22,7 @@ a named \code{list} when \code{info_type = "meta"}. descriptions for marine products available from Copernicus } \examples{ -\dontrun{ +\donttest{ copernicus_products_list() ## Query a specific product: diff --git a/man/copernicus_wms2geotiff.Rd b/man/copernicus_wms2geotiff.Rd index 7bf3c58..17a9a67 100644 --- a/man/copernicus_wms2geotiff.Rd +++ b/man/copernicus_wms2geotiff.Rd @@ -46,7 +46,7 @@ that can be handled by plots. You can use this function to store a subset of a WMS map as a geo-referenced TIFF file. } \examples{ -\dontrun{ +\donttest{ destination <- tempfile("wms", fileext = ".tiff") copernicus_wms2geotiff( product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", diff --git a/man/copernicus_wms_details.Rd b/man/copernicus_wms_details.Rd index 7f3f6a1..7e74f85 100644 --- a/man/copernicus_wms_details.Rd +++ b/man/copernicus_wms_details.Rd @@ -23,7 +23,7 @@ Returns a \code{tibble} with WMS URLs and descriptors for the specified product. products and layers. Use this function to obtain URLs of WMS services if any. } \examples{ -\dontrun{ +\donttest{ copernicus_wms_details( product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m", diff --git a/man/reexports.Rd b/man/reexports.Rd index 52f9b9d..07e30c1 100644 --- a/man/reexports.Rd +++ b/man/reexports.Rd @@ -3,11 +3,16 @@ \name{\%>\%} \alias{\%>\%} \title{Objects exported from other packages} +\value{ +Returns the result of the function call on the right-hand side of the pipe operator. +The left-hand side is used as first argument to the call to the right-hand side. For +more details see \link[dplyr:reexports]{dplyr::reexports}. +} \description{ Objects imported and exported from other packages. See original documentation for more details. } \details{ \describe{ -\item{dplyr}{\code{\link[dplyr:reexports]{\\\%>\\\%()}}} +\item{dplyr pipe operator}{\code{\link[dplyr:reexports]{\%>\%}}} } }