From 3d8f899cfa5fdac9a5c42c65f4b70c05c55771f8 Mon Sep 17 00:00:00 2001 From: Roy Mendelssohn Date: Tue, 22 Aug 2023 09:52:36 -0700 Subject: [PATCH] CRAN Version 1.0.2 Fixes issue with package-level documentation --- DESCRIPTION | 4 ++-- NEWS.md | 4 ++++ R/add_griddap.R | 33 +++++++++++++--------------- R/plotdap-package.R | 31 ++++++++++++++++++++++++++ cran-comments.md | 14 ++++-------- man/add_griddap.Rd | 34 ++++++++++++++-------------- man/plotdap-package.Rd | 50 ++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 122 insertions(+), 48 deletions(-) create mode 100644 R/plotdap-package.R create mode 100644 man/plotdap-package.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 712947c..2f35269 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: plotdap Title: Easily Visualize Data from 'ERDDAP' Servers via the 'rerddap' Package -Version: 1.0.1 -Date: 2022-12-21 +Version: 1.0.2 +Date: 2023-08-21 Authors@R: c( person("Carson", "Sievert", role = "aut"), person("Roy", "Mendelssohn", role = c("aut", "ctb", "cre"), email = "roy.mendelssohn@noaa.gov")) diff --git a/NEWS.md b/NEWS.md index 4a4474a..7add79e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# plotdap 1.0.2 + + fixed problem with package level documentation not working properly + # plotdap 1.0.1 Correctly removed dependency on rgeos, rgdal diff --git a/R/add_griddap.R b/R/add_griddap.R index aca6a20..c0a893c 100644 --- a/R/add_griddap.R +++ b/R/add_griddap.R @@ -34,29 +34,26 @@ #' #' # actual datasets in data folder to meet execution timings #' -#'\donttest{ -#' murSST <- rerddap::griddap( -#' 'jplMURSST41', latitude = c(35, 40), longitude = c(-125, -120.5), -#' time = c('last', 'last'), fields = 'analysed_sst' -#' ) #' -#' QMwind <- rerddap::griddap( -#' 'erdQMwindmday', time = c('2016-11-16', '2017-01-16'), -#' latitude = c(30, 50), longitude = c(210, 240), -#' fields = 'x_wind' -#' ) +#' # murSST <- rerddap::griddap( +#' # ' jplMURSST41', latitude = c(35, 40), longitude = c(-125, -120.5), +#' # time = c('last', 'last'), fields = 'analysed_sst' +#' # ) #' -#' p <- plotdap(crs = "+proj=robin") -#' add_griddap(p, murSST, ~analysed_sst) +#' # QMwind <- rerddap::griddap( +#' # 'erdQMwindmday', time = c('2016-11-16', '2017-01-16'), +#' # latitude = c(30, 50), longitude = c(210, 240), +#' # fields = 'x_wind' +#' # ) #' -#' p <- plotdap(mapTitle = "Average wind over time") -#' add_griddap(p, QMwind, ~x_wind) +#' p <- plotdap(crs = "+proj=robin") +#' p <- add_griddap(p, murSST, ~analysed_sst) #' -#'} +#' # p <- plotdap(mapTitle = "Average wind over time") +#' # p <- add_griddap(p, QMwind, ~x_wind) #' -# -#' p <- plotdap("base", crs = "+proj=robin") -#' p <- add_griddap(p, murSST, ~analysed_sst) +#' # p <- plotdap("base", crs = "+proj=robin") +#' # p <- add_griddap(p, murSST, ~analysed_sst) #' #' # layer tables on top of grids #' require(magrittr) diff --git a/R/plotdap-package.R b/R/plotdap-package.R new file mode 100644 index 0000000..3b9dbb2 --- /dev/null +++ b/R/plotdap-package.R @@ -0,0 +1,31 @@ +#' plotdap: Easily Visualize Data from 'ERDDAP' Servers via the 'rerddap' Package +#' +#' +#' Easily visualize and animate 'tabledap' and 'griddap' objects obtained via the +#' 'rerddap' package in a simple one-line command, using either base graphics or +#' 'ggplot2' graphics. 'plotdap' handles extracting and reshaping the data, map +#' projections and continental outlines. Optionally the data can be animated +#' through time using the 'gganmiate' package.#' +#' +#' The package contains four main functions: +#' +#' @section Main Functions: +#' \itemize{ +#' \item \code{plotdap} - Visualize data returned from rerddap servers. +#' \item \code{add_griddap} - Add rerddap::griddap() data to a plotdap map +#' \item \code{add_tabledap} - Add rerddap::tabledap data to a plotdap map +#' \item \code{add_ggplot} - Add ggplot2 elements to a plotdap object +#' } +#'#' +#' @section Details: +#' Besides the terse help documents, more detail in using the +#' functions are given in the included vignette "using_plotdap". The datasets used +#' in the vignette are included in the "data" directory. + +#' @keywords internal +#'@aliases plotdap-package +"_PACKAGE" + +## usethis namespace: start +## usethis namespace: end +NULL diff --git a/cran-comments.md b/cran-comments.md index 4126fda..773549b 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,13 +1,9 @@ -## Various minor fixes - -Correctly removed dependency on rgeos, rgdal - - - +## Minor fix +fixes problem with package level documentation ## Test environments -* local OS X install, R 4.2.2 +* local OS X install, R 4.3.1 * rhub * macOS-builder * win-builder (devel and release) @@ -16,9 +12,7 @@ Correctly removed dependency on rgeos, rgdal ### OS X -Duration: 4m 23.5s - -0 errors ✓ | 0 warnings ✓ | 0 notes ✓ +OK ### Winbuilder release diff --git a/man/add_griddap.Rd b/man/add_griddap.Rd index 860b104..297c496 100644 --- a/man/add_griddap.Rd +++ b/man/add_griddap.Rd @@ -62,29 +62,27 @@ a 'plotdap' map # actual datasets in data folder to meet execution timings -\donttest{ - murSST <- rerddap::griddap( - 'jplMURSST41', latitude = c(35, 40), longitude = c(-125, -1205), - time = c('last', 'last'), fields = 'analysed_sst' - ) - - QMwind <- rerddap::griddap( - 'erdQMwindmday', time = c('2016-11-16', '2017-01-16'), - latitude = c(30, 50), longitude = c(210, 240), - fields = 'x_wind' - ) -p <- plotdap(crs = "+proj=robin") -add_griddap(p, murSST, ~analysed_sst) - -p <- plotdap(mapTitle = "Average wind over time") -add_griddap(p, QMwind, ~x_wind) + # murSST <- rerddap::griddap( + # ' jplMURSST41', latitude = c(35, 40), longitude = c(-125, -120.5), + # time = c('last', 'last'), fields = 'analysed_sst' + # ) -} + # QMwind <- rerddap::griddap( + # 'erdQMwindmday', time = c('2016-11-16', '2017-01-16'), + # latitude = c(30, 50), longitude = c(210, 240), + # fields = 'x_wind' + # ) -p <- plotdap("base", crs = "+proj=robin") +p <- plotdap(crs = "+proj=robin") p <- add_griddap(p, murSST, ~analysed_sst) + # p <- plotdap(mapTitle = "Average wind over time") + # p <- add_griddap(p, QMwind, ~x_wind) + +# p <- plotdap("base", crs = "+proj=robin") +# p <- add_griddap(p, murSST, ~analysed_sst) + # layer tables on top of grids require(magrittr) p <- plotdap("base") \%>\% diff --git a/man/plotdap-package.Rd b/man/plotdap-package.Rd new file mode 100644 index 0000000..d95d415 --- /dev/null +++ b/man/plotdap-package.Rd @@ -0,0 +1,50 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plotdap-package.R +\docType{package} +\name{plotdap-package} +\alias{plotdap-package} +\alias{_PACKAGE} +\title{plotdap: Easily Visualize Data from 'ERDDAP' Servers via the 'rerddap' Package} +\description{ +Easily visualize and animate 'tabledap' and 'griddap' objects obtained via the +'rerddap' package in a simple one-line command, using either base graphics or +'ggplot2' graphics. 'plotdap' handles extracting and reshaping the data, map + projections and continental outlines. Optionally the data can be animated + through time using the 'gganmiate' package.#' +} +\details{ +The package contains four main functions: +} +\section{Main Functions}{ + +\itemize{ +\item \code{plotdap} - Visualize data returned from rerddap servers. +\item \code{add_griddap} - Add rerddap::griddap() data to a plotdap map +\item \code{add_tabledap} - Add rerddap::tabledap data to a plotdap map +\item \code{add_ggplot} - Add ggplot2 elements to a plotdap object + } +#' + @section Details: +Besides the terse help documents, more detail in using the +functions are given in the included vignette "using_plotdap". The datasets used +in the vignette are included in the "data" directory. +} + +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/rmendels/plotdap} + \item Report bugs at \url{https://github.com/rmendels/plotdap/issues} +} + +} +\author{ +\strong{Maintainer}: Roy Mendelssohn \email{roy.mendelssohn@noaa.gov} [contributor] + +Authors: +\itemize{ + \item Carson Sievert +} + +} +\keyword{internal}