From 3b0f9d044ede6b28247055d8257485f54467c90f Mon Sep 17 00:00:00 2001 From: Sam Woodman Date: Wed, 28 Feb 2024 14:37:11 -0800 Subject: [PATCH] doc updates --- R/global-vars.R | 61 ------------------------ R/mod_afs_study_beach_census.R | 7 +-- R/mod_season_info.R | 21 ++++----- R/mutate_factor_species.R | 20 ++++---- R/shiny-modules.R | 22 ++++----- R/tamatoa.R | 3 ++ R/tamatoamlr-package.R | 75 ++++++++++++++++++++++++++++++ README.md | 11 ++--- man/afs.study.beach.counts.Rd | 4 +- man/csphoc.core.location.groups.Rd | 8 ++-- man/mod_season_info.Rd | 16 +++---- man/mutate_factor_species.Rd | 20 ++++---- man/shiny_modules.Rd | 33 +++++-------- 13 files changed, 155 insertions(+), 146 deletions(-) delete mode 100644 R/global-vars.R diff --git a/R/global-vars.R b/R/global-vars.R deleted file mode 100644 index d09a0b7..0000000 --- a/R/global-vars.R +++ /dev/null @@ -1,61 +0,0 @@ -utils::globalVariables(c( - # https://github.com/r-lib/tidyselect/issues/248 - "where", ".", - - # Commonly used variables - "observer", "location", "location_group", "beach_id", "species", - "Beach", "Beaches", "loc_lower", "loc_clean", "week_num", "header_id", - "capture_id", - - # Plotting - "count_class", "count_value", "species_lty", - - # season_info - "season_name", "season_open_date", "season_close_date", "season_days", - "diet_scat_date", "date_median_pupping", "ts", - - # Phocid census - "census_phocid_header_id", "census_id", "census_type", - "census_date_start", "census_date_end", - "census_date", "time_start", "time_end", - "ad_female_count", "ad_male_count", "ad_unk_count", - "juv_female_count", "juv_male_count", "juv_unk_count", - "pup_live_count", "pup_dead_count", - "unk_female_count", "unk_male_count", "unk_unk_count", - "census_notes", "census_created_dt", - - - # AFS Capewide Pup Census - "pup_count", "pup_live_count", "pup_dead_count", "date_min", - "count_loc_mean", "count_loc_var", "count_loc_sd", "study_beach_count", - "count_mean", "count_var", "count_sd", "count_range", "group", - "census_date_min", "count_range_perc_diff", - - # AFS Study Beach Census - "ad_male_count_sum", "adult_male_non_terr_count", "adult_male_terr_count", - "adult_male_terr_noFem_count", "adult_male_terr_wFem_count", - "adult_male_unk_count", - - - # Misc - "Code", "Day", "Hr", "ID", "Mass", "Mn", "Sig", "Yr", "action", - "attendance_study", "body_condition", "box_time", - "capt_to_release", "capt_to_reunion", "capture_date", "capture_date_rm", - "capture_datetime", "capture_location", "capture_time", "capture_time_rm", - "ccamlr_pup_weights_notes", "census_afs_capewide_pup_sort", "cohort", - "combined_number", "d", "datetime", "datetime_prev", "days_diff", - "device_inventory_id", "device_num", "device_type", "exclude_count", "freq", - "frequency", "gas_off", "gas_on", "gas_time", "head", "header_notes", "in_box", - "location_fctr", "location_lty", "m", "mass_kg", "mass_std_deviation", - "mass_std_error", "mass_total_kg", "max_dt", "mean_mass_kg", "min_dt", "n_records", - "n_resights", "n_trips", "n_weights", "name", "notes_tmp", "number_of_captures", - "parturition", "parturition_date", "pinniped_id", "pinniped_season_id", - "primary_tag", "pup_alive", "pup_mortality", "pup_mortality_date", "pup_num", - "pup_total_count", "release_time", "research_program", "resight_date", - "resight_time", "reunion_time", "round_date", "round_num", "sd", "season_date", - "season_info_id", "sex", "sig", "station", "std_length_cm", "tag_freq_code", "tag_letter", - "tag_numeric", "tag_sort", "tag_type", "tagging_date", "tare_check", "tare_kg", "time", - "time_diff_hr", "trip_length_hr", "trip_length_hr_mean", "trip_num", - "trip_num_completed", "trip_num_completed_max", "notes" -)) - diff --git a/R/mod_afs_study_beach_census.R b/R/mod_afs_study_beach_census.R index 0124145..23c084c 100644 --- a/R/mod_afs_study_beach_census.R +++ b/R/mod_afs_study_beach_census.R @@ -110,8 +110,8 @@ mod_afs_study_beach_census_server <- function(id, src, season.df, tab) { grepl("_count", census.names) | grepl("_sum", census.names)] validate( - need(all(afs.study.beach.counts %in% census.names) & - all(choices.names.cs %in% afs.study.beach.counts), + need(all(tamatoamlr::afs.study.beach.counts %in% census.names) & + all(choices.names.cs %in% tamatoamlr::afs.study.beach.counts), paste("The column names from afs.study.beach.counts", "and names(census_df_collect()) are not identical -", "please adjust the afs.study.beach.counts variable")) @@ -119,7 +119,8 @@ mod_afs_study_beach_census_server <- function(id, src, season.df, tab) { selectInput( session$ns("age_sex"), tags$h5("Columns to plot"), - choices = afs.study.beach.counts, selected = c("pup_live_count"), + choices = tamatoamlr::afs.study.beach.counts, + selected = c("pup_live_count"), multiple = TRUE, selectize = TRUE ) }) diff --git a/R/mod_season_info.R b/R/mod_season_info.R index 208f50e..69cd3f3 100644 --- a/R/mod_season_info.R +++ b/R/mod_season_info.R @@ -4,7 +4,7 @@ #' #' @name mod_season_info #' -#' @param id character used to specify namespace, see \code{\link[shiny]{NS}} +#' @param id character used to specify namespace, see [shiny::NS()] #' @param col.width integer; column width of column of UI widgets #' #' @export @@ -25,18 +25,17 @@ mod_season_info_ui <- function(id, col.width = 7) { #' @name mod_season_info #' -#' @param pool reactive; a DBI database connection pool, -#' intended to be the output of \code{\link{mod_database_server}} -#' @param si.name character; name of season information table. -#' Default is 'season_info' +#' @param src reactive; a DBI database connection src, intended to be the output +#' of `mod_database_server()` +#' @param si.name character; name of season information table. Default is +#' 'season_info' #' -#' @returns -#' \code{mod_season_server} returns a list with one component: -#' a reactive of the season information data frame +#' @returns `mod_season_server()` returns a list with one component: a reactive +#' of the season information data frame #' #' @export -mod_season_info_server <- function(id, pool, si.name = "season_info") { - stopifnot(is.reactive(pool)) +mod_season_info_server <- function(id, src, si.name = "season_info") { + stopifnot(is.reactive(src)) moduleServer( id, @@ -50,7 +49,7 @@ mod_season_info_server <- function(id, pool, si.name = "season_info") { # Get data from table season_info <- reactive({ - df.out <- tbl(req(pool()), si.name) %>% + df.out <- tbl(req(src()), si.name) %>% select(-ts) %>% arrange(desc(season_open_date)) %>% collect() diff --git a/R/mutate_factor_species.R b/R/mutate_factor_species.R index bd0197b..18eb41d 100644 --- a/R/mutate_factor_species.R +++ b/R/mutate_factor_species.R @@ -1,18 +1,20 @@ #' Convert species column to a factor #' -#' A 'wrapper' around mutate that converts the species column to a factor with the specified levels +#' A 'wrapper' around mutate that converts the species column to a factor with +#' the specified levels #' #' @param x data frame that at minimum contains a 'species' column -#' @param levels character; passed to 'levels' argument of \code{\link[base]{factor}}. -#' Default is \code{names(\link{pinniped.sp})} +#' @param levels character; passed to 'levels' argument of +#' \code{\link[base]{factor}}. Default is \code{names(\link{pinniped.sp})} #' -#' @details A wrapper around \code{\link[dplyr]{mutate}} that converts -#' the species column to a factor with the specified levels. -#' This allows this function to be used directly in dplyr pipelines. +#' @details A wrapper around \code{\link[dplyr]{mutate}} that converts the +#' species column to a factor with the specified levels. This allows this +#' function to be used directly in dplyr pipelines. #' -#' @return \code{x}, with the column 'species' converted to a \link[base]{factor} that -#' has levels: \code{\link[base]{names}(\link{pinniped.sp})}, i.e. -#' \code{c("Fur seal", "Crabeater seal", etc.)} +#' @return \code{x}, with the column 'species' converted to a +#' \link[base]{factor} that has levels: +#' \code{\link[base]{names}(\link{pinniped.sp})}, i.e. \code{c("Fur seal", +#' "Crabeater seal", etc.)} #' #' @examples #' x <- data.frame(species = c("Fur seal", "Weddell seal"), count = c(2, 1)) diff --git a/R/shiny-modules.R b/R/shiny-modules.R index 9c8f696..a003421 100644 --- a/R/shiny-modules.R +++ b/R/shiny-modules.R @@ -1,17 +1,15 @@ -#' Modules for the different tabs of Tamatoa, the tamatoamlr Shiny app +#' Tamatoa data modules #' -#' Modules for the different tabs of Tamatoa, the tamatoamlr Shiny app +#' Modules for the different tabs of Tamatoa, the `tamatoamlr` Shiny app #' #' @name shiny_modules #' -#' @param id character used to specify namespace, see \code{shiny::\link[shiny]{NS}} -#' @param src reactive; a DBI database connection. -#' Intended to be the output of \code{\link{mod_database_server}}, -#' i.e. a pool object -#' @param season.df reactive; the season info data frame. -#' Intended to be the first element (\code{season.df}) of -#' the (list) output of \code{\link{mod_filter_season_server}} -#' @param tab reactive; the selected tab. -#' Used by the modules to only collect data from database if the -#' relevant tab is chosen +#' @param id character used to specify namespace, see [shiny::NS()] +#' @param src reactive; a DBI database connection. Intended to be the output of +#' [mod_database_server()], i.e. a pool object +#' @param season.df reactive; the season info data frame. Intended to be the +#' first element (`season.df`) of the (list) output of +#' [mod_filter_season_server()] +#' @param tab reactive; the selected tab. Used by the modules to only collect +#' data from database if the relevant tab is chosen NULL diff --git a/R/tamatoa.R b/R/tamatoa.R index 85a6cb7..8feee93 100644 --- a/R/tamatoa.R +++ b/R/tamatoa.R @@ -73,6 +73,8 @@ tamatoa <- function(..., if (dbIsValid(pool.remote.prod)) poolClose(pool.remote.prod) if (isTruthy(pool.remote.test)) if (dbIsValid(pool.remote.test)) poolClose(pool.remote.test) + if (isTruthy(pool.local.prod)) + if (dbIsValid(pool.local.prod)) poolClose(pool.local.prod) }) @@ -161,6 +163,7 @@ tamatoa <- function(..., ### Quit GUI session$onSessionEnded(function() { # Close current pool object. Needed here in case working off 'other' db + # on.exit(dbDisconnect(conn)) isolate({ if (inherits(db.pool(), "Pool")) { if (dbIsValid(db.pool())) { diff --git a/R/tamatoamlr-package.R b/R/tamatoamlr-package.R index d0695cd..41628bf 100644 --- a/R/tamatoamlr-package.R +++ b/R/tamatoamlr-package.R @@ -41,7 +41,82 @@ #' @keywords package "_PACKAGE" + + # https://github.com/hadley/r-pkgs/issues/828 ignore_unused_imports <- function() { dbplyr::sql } + + + +# https://github.com/r-lib/tidyselect/issues/248 +# https://r-pkgs.org/package-within.html#echo-a-working-package +utils::globalVariables(c( + "where", ".", + + # Commonly used variables + "observer", "location", "location_group", "beach_id", "species", + "Beach", "Beaches", "loc_lower", "loc_clean", "week_num", "header_id", + "capture_id", + + # Plotting + "count_class", "count_value", "species_lty", + + # season_info + "season_name", "season_open_date", "season_close_date", "season_days", + "diet_scat_date", "date_median_pupping", "ts", + + # Phocid census + "census_phocid_header_id", "census_id", "census_type", + "census_date_start", "census_date_end", + "census_date", "time_start", "time_end", + "ad_female_count", "ad_male_count", "ad_unk_count", + "juv_female_count", "juv_male_count", "juv_unk_count", + "pup_live_count", "pup_dead_count", + "unk_female_count", "unk_male_count", "unk_unk_count", + "census_notes", "census_created_dt", + + + # AFS Capewide Pup Census + "pup_count", "pup_live_count", "pup_dead_count", "date_min", + "count_loc_mean", "count_loc_var", "count_loc_sd", "study_beach_count", + "count_mean", "count_var", "count_sd", "count_range", "group", + "census_date_min", "count_range_perc_diff", + + # AFS Study Beach Census + "ad_male_count_sum", "adult_male_non_terr_count", "adult_male_terr_count", + "adult_male_terr_noFem_count", "adult_male_terr_wFem_count", + "adult_male_unk_count", + + + # Misc + "Code", "Day", "Hr", "ID", "Mass", "Mn", "Sig", "Yr", "action", + "attendance_study", "body_condition", "box_time", + "capt_to_release", "capt_to_reunion", "capture_date", "capture_date_rm", + "capture_datetime", "capture_location", "capture_time", "capture_time_rm", + "ccamlr_pup_weights_notes", "census_afs_capewide_pup_sort", "cohort", + "combined_number", "d", "datetime", "datetime_prev", "days_diff", + "device_inventory_id", "device_num", "device_type", "exclude_count", "freq", + "frequency", "gas_off", "gas_on", "gas_time", "head", "header_notes", "in_box", + "location_fctr", "location_lty", "m", "mass_kg", "mass_std_deviation", + "mass_std_error", "mass_total_kg", "max_dt", "mean_mass_kg", "min_dt", "n_records", + "n_resights", "n_trips", "n_weights", "name", "notes_tmp", "number_of_captures", + "parturition", "parturition_date", "pinniped_id", "pinniped_season_id", + "primary_tag", "pup_alive", "pup_mortality", "pup_mortality_date", "pup_num", + "pup_total_count", "release_time", "research_program", "resight_date", + "resight_time", "reunion_time", "round_date", "round_num", "sd", "season_date", + "season_info_id", "sex", "sig", "station", "std_length_cm", "tag_freq_code", "tag_letter", + "tag_numeric", "tag_sort", "tag_type", "tagging_date", "tare_check", "tare_kg", "time", + "time_diff_hr", "trip_length_hr", "trip_length_hr_mean", "trip_num", + "trip_num_completed", "trip_num_completed_max", "notes", + + "freq_chr", "recovery_date", "deployment_date", "end_date", "tag_primary", + "tag_type_primary", "tag_unique_primary", "non_amlr_tag_primary", + "tag_sort_primary", "amlr_tag_primary", "apw_collect", "unk_group_id", + "deployment_season", "pinniped_sex", "arrival_date", 'twins', "status", "age", + "on_the_fly_id", "sample_type", "sample_type_group", "age_class", + "individual_seals_count", "n_adults_juveniles", "n_pups", "ad_male_sum", + "tag_resights_leopards_id", "id_unique", "package_count" +)) + diff --git a/README.md b/README.md index 24ca339..a170d81 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,11 @@ [![R-CMD-check](https://github.com/us-amlr/tamatoamlr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/us-amlr/tamatoamlr/actions/workflows/R-CMD-check.yaml) -tamatoamlr and Tamatoa, the package's accompanying Shiny app, are for analyzing and visualizing data collected by the [U.S. AMLR Program's](https://www.fisheries.noaa.gov/about/antarctic-ecosystem-research-division-southwest-fisheries-science-center) [Pinniped Research Group](https://www.fisheries.noaa.gov/international/science-data/pinniped-research-antarctic). +`tamatoamlr` and Tamatoa, the package's accompanying Shiny app, are for analyzing and visualizing data collected by the [U.S. AMLR Program's](https://www.fisheries.noaa.gov/about/antarctic-ecosystem-research-division-southwest-fisheries-science-center) [Pinniped Research Group](https://www.fisheries.noaa.gov/international/science-data/pinniped-research-antarctic). ## Installation -You can install the development version of tamatoamlr from [GitHub](https://github.com/) with: +You can install the development version of `tamatoamlr` from [GitHub](https://github.com/) with: ``` r # install.packages("devtools") @@ -18,7 +18,7 @@ devtools::install_github("us-amlr/tamatoamlr") ## Tamatoa: Shiny app -To run Tamatoa, the tamatoamlr Shiny app, locally, you must have R and [RStudio](https://www.rstudio.com/products/rstudio/download/#download) installed. From within RStudio, install tamatoamlr as described above, and then run the following code in your RStudio console to launch the Shiny app: +To run Tamatoa, the `tamatoamlr` Shiny app, locally, you must have R and [RStudio](https://www.rstudio.com/products/rstudio/download/#download) installed. From within RStudio, install `tamatoamlr` as described above, and then run the following code in your RStudio console to launch the Shiny app: ``` r tamatoamlr::tamatoa() @@ -30,10 +30,9 @@ By default, Tamatoa attempts to connect to the database on the SWFSC server. For * `mod_database_server`, from [amlrDatabases](https://github.com/us-amlr/amlrDatabases), returns the connection to the user-specified database via a [pool](https://github.com/rstudio/pool) object that is used by the rest of the tamatoamlr Shiny App modules. Pool connections to the four possible databases (remote/local and AMLR_PINNIPEDS/AMLR_PINNIPEDS_Test) may be generated and passed to `mod_database_server`, depending on the arguments passed to `tamatoa()`. -* `mod_season_info_server` returns the season information data for the rest of the modules +* `mod_season_info_server` returns the season information data used by the rest of the modules -* The 'Database and season info' tab relies on mod_database and mod_season_info. The rest of the tabs all have a dedicated module that takes at least the pool object from mod_database, and generally season.df and season.id.list from mod_season_info_server, as inputs. These modules pass both a table and a plot to mod_output_server from [amlrDatabases](https://github.com/us-amlr/amlrDatabases), which displays the table and plot along with associated visualization and download options. These modules generally depend on views created in the database. -TODO: this needs a system that is more robust to changes in the SQL server views. For instance, each view has a function that checks for required column names, and returns a df with standardized capitalization things? +* The 'Database and season info' tab relies on `mod_database` and `mod_season_info`. The rest of the tabs all have a dedicated module that takes at least the pool object from `mod_database`, and generally the season.df data frame output from `mod_season_info_server`, as inputs. These modules pass both a table and a plot to `mod_output_server` from [amlrDatabases](https://github.com/us-amlr/amlrDatabases), which displays the table and plot along with associated visualization and download options. These modules generally depend on views created in the database. ## Disclaimer diff --git a/man/afs.study.beach.counts.Rd b/man/afs.study.beach.counts.Rd index 6dcef20..2e50d87 100644 --- a/man/afs.study.beach.counts.Rd +++ b/man/afs.study.beach.counts.Rd @@ -11,7 +11,7 @@ A character vector afs.study.beach.counts } \description{ -Names of the AFS study beach census columns, in order, -to select for and display +Names of the AFS study beach census columns, in order, to select for and +display } \keyword{datasets} diff --git a/man/csphoc.core.location.groups.Rd b/man/csphoc.core.location.groups.Rd index 79346c0..4425d01 100644 --- a/man/csphoc.core.location.groups.Rd +++ b/man/csphoc.core.location.groups.Rd @@ -11,10 +11,10 @@ A character vector csphoc.core.location.groups } \description{ -Names of Cape Shirreff Phocid Census (CS-PHOC) core census locations. -Note that while the majority of these correspond directly to a row in the +Names of Cape Shirreff Phocid Census (CS-PHOC) core census locations. Note +that while the majority of these correspond directly to a row in the AMLR_PINNIPEDS.beaches table, officially these are all location group values. -This means they have been designed to correspond to the -location_group column in the AMLR_PINNIPEDS.vCensus_Phocid view. +This means they have been designed to correspond to the location_group column +in the AMLR_PINNIPEDS.vCensus_Phocid view. } \keyword{datasets} diff --git a/man/mod_season_info.Rd b/man/mod_season_info.Rd index 9bf6f5a..20af5f5 100644 --- a/man/mod_season_info.Rd +++ b/man/mod_season_info.Rd @@ -8,22 +8,22 @@ \usage{ mod_season_info_ui(id, col.width = 7) -mod_season_info_server(id, pool, si.name = "season_info") +mod_season_info_server(id, src, si.name = "season_info") } \arguments{ -\item{id}{character used to specify namespace, see \code{\link[shiny]{NS}}} +\item{id}{character used to specify namespace, see \code{\link[shiny:NS]{shiny::NS()}}} \item{col.width}{integer; column width of column of UI widgets} -\item{pool}{reactive; a DBI database connection pool, -intended to be the output of \code{\link{mod_database_server}}} +\item{src}{reactive; a DBI database connection src, intended to be the output +of \code{mod_database_server()}} -\item{si.name}{character; name of season information table. -Default is 'season_info'} +\item{si.name}{character; name of season information table. Default is +'season_info'} } \value{ -\code{mod_season_server} returns a list with one component: -a reactive of the season information data frame +\code{mod_season_server()} returns a list with one component: a reactive +of the season information data frame } \description{ Shiny module for season information diff --git a/man/mutate_factor_species.Rd b/man/mutate_factor_species.Rd index 63735eb..8ee9ec3 100644 --- a/man/mutate_factor_species.Rd +++ b/man/mutate_factor_species.Rd @@ -9,21 +9,23 @@ mutate_factor_species(x, levels = names(tamatoamlr::pinniped.sp)) \arguments{ \item{x}{data frame that at minimum contains a 'species' column} -\item{levels}{character; passed to 'levels' argument of \code{\link[base]{factor}}. -Default is \code{names(\link{pinniped.sp})}} +\item{levels}{character; passed to 'levels' argument of +\code{\link[base]{factor}}. Default is \code{names(\link{pinniped.sp})}} } \value{ -\code{x}, with the column 'species' converted to a \link[base]{factor} that -has levels: \code{\link[base]{names}(\link{pinniped.sp})}, i.e. -\code{c("Fur seal", "Crabeater seal", etc.)} +\code{x}, with the column 'species' converted to a +\link[base]{factor} that has levels: +\code{\link[base]{names}(\link{pinniped.sp})}, i.e. \code{c("Fur seal", + "Crabeater seal", etc.)} } \description{ -A 'wrapper' around mutate that converts the species column to a factor with the specified levels +A 'wrapper' around mutate that converts the species column to a factor with +the specified levels } \details{ -A wrapper around \code{\link[dplyr]{mutate}} that converts -the species column to a factor with the specified levels. -This allows this function to be used directly in dplyr pipelines. +A wrapper around \code{\link[dplyr]{mutate}} that converts the +species column to a factor with the specified levels. This allows this +function to be used directly in dplyr pipelines. } \examples{ x <- data.frame(species = c("Fur seal", "Weddell seal"), count = c(2, 1)) diff --git a/man/shiny_modules.Rd b/man/shiny_modules.Rd index 737c7e5..8f409d7 100644 --- a/man/shiny_modules.Rd +++ b/man/shiny_modules.Rd @@ -1,9 +1,8 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/mod_afs_capewide_pup_census.R, % R/mod_afs_study_beach_census.R, R/mod_captures.R, -% R/mod_ccamlr_pup_weights.R, R/mod_dcc_pinniped.R, R/mod_dcc_raw.R, -% R/mod_phocid_census.R, R/mod_tag_resights.R, R/mod_takes.R, R/mod_views.R, -% R/shiny-modules.R +% R/mod_ccamlr_pup_weights.R, R/mod_dcc_pinniped.R, R/mod_phocid_census.R, +% R/mod_tag_resights.R, R/mod_takes.R, R/mod_views.R, R/shiny-modules.R \name{shiny_modules} \alias{shiny_modules} \alias{mod_afs_capewide_pup_census_ui} @@ -16,8 +15,6 @@ \alias{mod_ccamlr_pup_weights_server} \alias{mod_dcc_pinniped_ui} \alias{mod_dcc_pinniped_server} -\alias{mod_dcc_raw_ui} -\alias{mod_dcc_raw_server} \alias{mod_phocid_census_ui} \alias{mod_phocid_census_server} \alias{mod_tag_resights_ui} @@ -26,7 +23,7 @@ \alias{mod_takes_server} \alias{mod_views_ui} \alias{mod_views_server} -\title{Modules for the different tabs of Tamatoa, the tamatoamlr Shiny app} +\title{Tamatoa data modules} \usage{ mod_afs_capewide_pup_census_ui(id) @@ -48,10 +45,6 @@ mod_dcc_pinniped_ui(id) mod_dcc_pinniped_server(id, src, season.df, tab) -mod_dcc_raw_ui(id) - -mod_dcc_raw_server(id, pool, season.df) - mod_phocid_census_ui(id) mod_phocid_census_server(id, src, season.df, tab) @@ -69,20 +62,18 @@ mod_views_ui(id) mod_views_server(id, src, season.df, tab) } \arguments{ -\item{id}{character used to specify namespace, see \code{shiny::\link[shiny]{NS}}} +\item{id}{character used to specify namespace, see \code{\link[shiny:NS]{shiny::NS()}}} -\item{src}{reactive; a DBI database connection. -Intended to be the output of \code{\link{mod_database_server}}, -i.e. a pool object} +\item{src}{reactive; a DBI database connection. Intended to be the output of +\code{\link[=mod_database_server]{mod_database_server()}}, i.e. a pool object} -\item{season.df}{reactive; the season info data frame. -Intended to be the first element (\code{season.df}) of -the (list) output of \code{\link{mod_filter_season_server}}} +\item{season.df}{reactive; the season info data frame. Intended to be the +first element (\code{season.df}) of the (list) output of +\code{\link[=mod_filter_season_server]{mod_filter_season_server()}}} -\item{tab}{reactive; the selected tab. -Used by the modules to only collect data from database if the -relevant tab is chosen} +\item{tab}{reactive; the selected tab. Used by the modules to only collect +data from database if the relevant tab is chosen} } \description{ -Modules for the different tabs of Tamatoa, the tamatoamlr Shiny app +Modules for the different tabs of Tamatoa, the \code{tamatoamlr} Shiny app }