Skip to content

Commit

Permalink
Merge pull request #160 from NOAA-EDAB/andy_fixcmd
Browse files Browse the repository at this point in the history
Fixed package to conform to CMD check
  • Loading branch information
BBeltz1 authored Oct 18, 2024
2 parents fe4f8a0 + 377fa6a commit 336ec17
Show file tree
Hide file tree
Showing 765 changed files with 159 additions and 76 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master, dev]
branches: [main, master, dev, andy_fixcmd]
pull_request:
branches: [main, master, dev]

Expand Down Expand Up @@ -48,5 +48,6 @@ jobs:

- uses: r-lib/actions/check-r-package@v2
with:
error-on: '"error"'
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Suggests:
tufte,
here,
usethis,
AICcmodavg,
mgcv,
zoo,
rlang
Expand Down
9 changes: 6 additions & 3 deletions R/geom_gls.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
#'
#'@param mapping Set of aesthetic mappings created by \code{aes()}. By default \code{inherit.aes = TRUE}, which
#'assigns the top-level plotting \code{aes()} to the GLS geom.
#'
#'@param data Input series to be analyzed. If NULL, data is inherited from previous layer or \code{ggplot} call.
#'
#'@param stat stat
#'@param position position
#'@param na.rm remove NAs
#'@param show.legend show legend
#'@param inherit.aes inherit aesthetics
#'@param warn Conditional. If \code{TRUE}, a warning message will be returned when N < 30.
#'
#'@param ... Other arguments may be passed to the stat, including fixed aesthetics.
Expand Down Expand Up @@ -37,7 +40,7 @@ geom_gls <- function(mapping = NULL, data = NULL, stat = "GLS",
position = "identity", na.rm = FALSE, show.legend = NA,
inherit.aes = TRUE, warn = TRUE, ...) {
ggplot2::layer(
geom = ecodata:::GeomGLS, mapping = mapping, data = data, stat = stat,
geom = GeomGLS, mapping = mapping, data = data, stat = stat,
position = position, show.legend = show.legend, inherit.aes = inherit.aes,
params = list(na.rm = na.rm, warn = warn, ...)
)
Expand Down
10 changes: 6 additions & 4 deletions R/geom_gls_gauss.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
#'
#'@param mapping Set of aesthetic mappings created by \code{aes()}. By default \code{inherit.aes = TRUE}, which
#'assigns the top-level plotting \code{aes()} to the GLS geom.
#'
#'@param data Input series to be analyzed. If NULL, data is inherited from previous layer or \code{ggplot} call.
#'
#'@param stat stat
#'@param position position
#'@param na.rm remove NAs
#'@param show.legend show legend
#'@param inherit.aes inherit aesthetics
#'@param warn Conditional. If \code{TRUE}, a warning message will be returned when N < 30.
#'
#'@param ... Other arguments may be passed to the stat, including fixed aesthetics.
#'
#'
Expand Down Expand Up @@ -37,7 +39,7 @@ geom_gls_gauss <- function(mapping = NULL, data = NULL, stat = "GLSgauss",
position = "identity", na.rm = FALSE, show.legend = NA,
inherit.aes = TRUE, warn = TRUE, ...) {
ggplot2::layer(
geom = ecodata:::GeomGLS, mapping = mapping, data = data, stat = stat,
geom = GeomGLS, mapping = mapping, data = data, stat = stat,
position = position, show.legend = show.legend, inherit.aes = inherit.aes,
params = list(na.rm = na.rm, warn = warn, ...)
)
Expand Down
13 changes: 10 additions & 3 deletions R/geom_lm.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@
#'
#'@param mapping Set of aesthetic mappings created by \code{aes()}. By default \code{inherit.aes = TRUE}, which
#'assigns the top-level plotting \code{aes()} to the GLS geom.
#'
#'@param data Input series to be analyzed. If NULL, data is inherited from previous layer or \code{ggplot} call.
#'
#'@param stat stat
#'@param position position
#'@param na.rm remove NAs
#'@param show.legend show legend
#'@param inherit.aes inherit aesthetics
#'@param warn Conditional. If \code{TRUE}, a warning message will be returned when N < 30.
#'@param n Numeric. Number of points to use for trend. Default = 10.
#'@param nBootSamples Numeric. Number of bootstrap samples used to test Null hypothesis. Default = 499
#'@param pValThreshold Numeric. Significance level of the test. Default = 0.05
#'@param ... Other arguments may be passed to the stat, including fixed aesthetics.
#'
#'
Expand Down Expand Up @@ -36,7 +43,7 @@ geom_lm <- function(mapping = NULL, data = NULL, stat = "LM",
inherit.aes = TRUE, warn = TRUE, n= 10, nBootSamples = 499,
pValThreshold = 0.05, ...) {
ggplot2::layer(
geom = ecodata:::GeomLM, mapping = mapping, data = data, stat = stat,
geom = GeomLM, mapping = mapping, data = data, stat = stat,
position = position, show.legend = show.legend, inherit.aes = inherit.aes,
params = list(n = n, na.rm = FALSE,nBootSamples = nBootSamples,
pValThreshold = pValThreshold, ...)
Expand Down
14 changes: 12 additions & 2 deletions R/geom_regime.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
#'A geom to fit a regime shifts to a time series
#'
#'@param data Input series to be analyzed. If NULL,
#'data is inherited from previous layer or \code{ggplot} call.
#'@param mapping Set of aesthetic mappings created by \code{aes()}. By default \code{inherit.aes = TRUE}, which
#'assigns the top-level plotting \code{aes()} to the GLS geom.
#'@param data Input series to be analyzed. If NULL, data is inherited from previous layer or \code{ggplot} call.
#'@param stat stat
#'@param position position
#'@param geom geom
#'@param na.rm remove NAs
#'@param show.legend show legend
#'@param inherit.aes inherit aesthetics
#'@param color color
#'
#'@param ... Other arguments may be passed to the stat, including fixed aesthetics.
#'
Expand All @@ -11,6 +19,7 @@
#'
#'
#'@examples
#'\dontrun{
#'library(ggplot2)
#'
#'#Generate series
Expand All @@ -26,6 +35,7 @@
#'ggplot(data = data) +
#' geom_line(aes(x = x, y = y)) +
#' geom_regime()
#'}

geom_regime <- function(data = NULL, mapping = NULL,
stat = "REGIME",
Expand Down
10 changes: 5 additions & 5 deletions R/hp_density.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#' @format A data set containing 6244 rows and 5 columns.
#'
#' \itemize{
#' \item {Latitude}{Latitude}
#' \item {Longitude}{Longitude}
#' \item {Value}{Value}
#' \item {Bin}{??}
#' \item {Season}{???}
#' \item Latitude: Latitude
#' \item Longitude: Longitude
#' \item Value: Value
#' \item Bin: ??
#' \item Season: ???
#'
#' }
#'
Expand Down
18 changes: 9 additions & 9 deletions R/long_line_survey.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
#' @format A data set containing 96 rows and 8 columns.
#'
#' \itemize{
#' \item {Cruise}{Latitude}
#' \item {Station}{Longitude}
#' \item {Year}{Value}
#' \item {Common_name}{??}
#' \item {Deceg_beglat_set}{???}
#' \item {Deceg_beglon_set}{???}
#' \item {categ}{???}
#' \item Cruise: Latitude
#' \item Station: Longitude
#' \item Year: Value
#' \item Common_name: ??
#' \item Deceg_beglat_set: ???
#' \item Deceg_beglon_set: ???
#' \item categ: ???
#'}
#'
#' }
#'
#' @details More information available at \url{link to techdoc}
#' @details More information available at (link to techdoc)
"long_line_survey"
14 changes: 7 additions & 7 deletions R/lps_sharks.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
#' @format A data set containing 90 rows and 5 columns.
#'
#' \itemize{
#' \item {Time}{???}
#' \item {Var}{???}
#' \item {Value}{???}
#' \item {EPU}{??}
#' \item {Units}{???}
#' \item Time: ???
#' \item Var: ???
#' \item Value: ???
#' \item EPU: ??
#' \item Units: ???
#'}
#'
#' }
#'
#' @details More information available at \url{link to techdoc}
#' @details More information available at (link to techdoc)
"lps_sharks"
4 changes: 3 additions & 1 deletion R/plot_aggregate_biomass.R
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,16 @@ plot_aggregate_biomass <- function(shadedRegion = NULL,
dplyr::filter(stringr::str_detect(Var,"Benthos")) |>
#ggplot(aes(x = Time, y = Mean)) +
ggplot2::ggplot() +
#Highlight last ten years
ggplot2::annotate("rect", fill = setup$shade.fill, alpha = setup$shade.alpha,
xmin = setup$x.shade.min , xmax = setup$x.shade.max ,
ymin = -Inf, ymax = Inf) +

#Highlight last ten years
#Test for trend and add lines
ecodata::geom_gls(ggplot2::aes(x = Time, y = Mean,
color = Var),
alpha = setup$trend.alpha, size = setup$trend.size) +

# ecodata::geom_lm(aes(x = Time, y = Mean,
# color = Var),
# alpha = trend.alpha, size = trend.size) +
Expand Down
2 changes: 1 addition & 1 deletion R/plot_storminess.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' plot storminess data
#'
#' plots [storminess]
#' plots storminess
#'
#' @param shadedRegion Numeric vector. Years denoting the shaded region of the plot (most recent 10)
#' @param report Character string. Which SOE report ("MidAtlantic", "NewEngland")
Expand Down
3 changes: 2 additions & 1 deletion R/theme_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' @export
#'
#' @examples
#'
#'\dontrun{
#' library(rnaturalearth); library(ggplot2)
#' library(dplyr); library(sf)
#'
Expand Down Expand Up @@ -31,6 +31,7 @@
#' geom_sf(data = coast) +
#' coord_sf(crs = crs, xlim = xlims, ylim = ylims) +
#' theme_map()
#' }

theme_map <- function(...) {
ggplot2::theme(
Expand Down
3 changes: 2 additions & 1 deletion R/theme_ts.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#' @export
#'
#' @examples
#' library(ggplot2)
#' m <- 0.1
#' x <- 1:30
#' y <- m*x + rnorm(30, sd = 0.35)
Expand All @@ -13,7 +14,7 @@
#' #Plot series with trend and SOE plot theme
#' ggplot(data = data) +
#' geom_line(aes(x = x, y = y)) +
#' stat_gls(aes(x = x, y = y, color = stat(col)))+
#' geom_gls(aes(x = x, y = y))+
#' theme_ts()

theme_ts <- function(...){
Expand Down
5 changes: 2 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ knitr::opts_chunk$set(
<!-- badges: start -->
[![gitleaks](https://github.com/NOAA-EDAB/ecodata/actions/workflows/secretScan.yml/badge.svg)](https://github.com/NOAA-EDAB/ecodata/actions/workflows/secretScan.yml)
[![gh-pages](https://github.com/NOAA-EDAB/ecodata/actions/workflows/pkgdown.yml/badge.svg)](https://github.com/NOAA-EDAB/ecodata/actions/workflows/pkgdown.yml)
[![R-CMD-check](https://github.com/NOAA-EDAB/ecodata/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/NOAA-EDAB/ecodata/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

## Overview
Expand Down Expand Up @@ -54,9 +55,7 @@ remotes::install_github("noaa-edab/ecodata@dev",build_vignettes=TRUE)

1. All derived data sets are available once the package has been loaded into the environment. View available data sets using the syntax `ecodata::...`

<p align="center" width="645">
<img src="https://raw.githubusercontent.com/NOAA-EDAB/ecodata/master/ecodata1.gif">
</p>
![](man/figures/ecodata1.gif)


### Legal disclaimer
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

[![gitleaks](https://github.com/NOAA-EDAB/ecodata/actions/workflows/secretScan.yml/badge.svg)](https://github.com/NOAA-EDAB/ecodata/actions/workflows/secretScan.yml)
[![gh-pages](https://github.com/NOAA-EDAB/ecodata/actions/workflows/pkgdown.yml/badge.svg)](https://github.com/NOAA-EDAB/ecodata/actions/workflows/pkgdown.yml)
[![R-CMD-check](https://github.com/NOAA-EDAB/ecodata/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/NOAA-EDAB/ecodata/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

## Overview
Expand Down Expand Up @@ -55,9 +56,7 @@ remotes::install_github("noaa-edab/ecodata@dev",build_vignettes=TRUE)
into the environment. View available data sets using the syntax
`ecodata::...`

<p align="center" width="645">
<img src="https://raw.githubusercontent.com/NOAA-EDAB/ecodata/master/ecodata1.gif">
</p>
![](man/figures/ecodata1.gif)

### Legal disclaimer

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 336ec17

Please sign in to comment.