Skip to content

Commit a656369

Browse files
committed
example tests for bundled data
1 parent 1303eb6 commit a656369

4 files changed

Lines changed: 78 additions & 0 deletions

File tree

R/example_bottom_temp.R

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#' Run test on bottom temperature example data set
2+
#'
3+
#' Performs the short term trend analysis on bundled data set
4+
#'
5+
#' @param epu character string. Name of the EPU to test ("GB", "GOM")
6+
#' @param nBootSims Numeric scalar. Number of bootstrap samples to perform
7+
#'
8+
#'
9+
#'@export
10+
11+
example_bottom_temp <- function(
12+
epu = "GB",
13+
nBootSims = 999
14+
) {
15+
dataSet <- arfit::bottom_temp_survey |>
16+
dplyr::filter(EPU == epu) |>
17+
dplyr::select(Time, Value) |>
18+
dplyr::rename(x = Time, y = Value)
19+
20+
res <- arfit::fit_real_data(dataSet, nBootSims = nBootSims, printFig = F)
21+
22+
return(res)
23+
}

R/example_surface_temp.R

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#' Run test on example OISST data set
2+
#'
3+
#' Performs the short term trend analysis on bundled data set
4+
#'
5+
#' @param epu character string. Name of the EPU to test ("GB", "GOM")
6+
#' @param nBootSims Numeric scalar. Number of bootstrap samples to perform
7+
#'
8+
#'
9+
#'@export
10+
11+
example_surface_temp <- function(
12+
epu = "GB",
13+
nBootSims = 999
14+
) {
15+
dataSet <- arfit::surface_temp_oisst |>
16+
dplyr::filter(EPU == epu) |>
17+
dplyr::select(Time, Value) |>
18+
dplyr::rename(x = Time, y = Value)
19+
20+
res <- arfit::fit_real_data(dataSet, nBootSims = nBootSims, printFig = F)
21+
22+
return(res)
23+
}

man/example_bottom_temp.Rd

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/example_surface_temp.Rd

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)