diff --git a/.github/workflows/check-full.yaml b/.github/workflows/check-full.yaml index c243bd19..40463825 100644 --- a/.github/workflows/check-full.yaml +++ b/.github/workflows/check-full.yaml @@ -2,13 +2,13 @@ on: push: branches: - master - - develop - testing + - develop pull_request: branches: - master - - develop - testing + - develop name: R-CMD-check @@ -38,7 +38,7 @@ jobs: # ubuntu-latest is 24 as of 2024-10-31. Should we use it? - {os: ubuntu-22.04, r: 'release', pkgext: '.tar.gz', rspm: "https://cloud.r-project.org"} - {os: ubuntu-22.04, r: 'oldrel', pkgext: '.tar.gz', rspm: "https://cloud.r-project.org"} - - {os: ubuntu-22.04, r: 'oldrel-1', pkgext: '.tar.gz', rspm: "https://cloud.r-project.org"} + # - {os: ubuntu-22.04, r: 'oldrel-2', pkgext: '.tar.gz', rspm: "https://cloud.r-project.org"} # Skipping the oldrel-2, as we need equal requirements across platforms env: R_REMOTES_NO_ERRORS_FROM_WARNINGS: true @@ -53,7 +53,7 @@ jobs: - uses: actions/checkout@v4 - - name: Do autorelease increment, tagging, and environment setup + - name: Prepare for deployment at push if: github.event_name == 'push' run: | curl "https://raw.githubusercontent.com/StoXProject/unstableRepo/main/scripts/checktag-actions.sh" --output unstableRepo_checktag.sh @@ -91,36 +91,12 @@ jobs: - ############################################################################# #### 2. R package installation (with system and R package dependencies): #### ############################################################################# - #- name: Query dependencies - # run: | - # install.packages('remotes') - # saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) - # writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") - # shell: Rscript {0} - - #- name: Cache R packages - # if: runner.os != 'Windows' - # uses: actions/cache@v4 - # with: - # path: ${{ env.R_LIBS_USER }} - # key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} - # restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- - - # We don't use the code below using remotes::system_requirements anymore, since we do not have control over that function and should rather hard code the dependencies, which also lists the dependencies explicitely: - #- name: Install system dependencies - # if: runner.os == 'Linux' - # run: | - # while read -r cmd - # do - # eval sudo $cmd - # done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "22.04"))') - - - name: Install MacOS system dependencies + ## 2a. System dependencies: + - name: Install system dependencies on macOS if: runner.os == 'macOS' run: | # gfortran may not exist in a period after a new R minor release: @@ -128,7 +104,6 @@ jobs: if [ -f "$gfortranFile" ] ; then rm "$gfortranFile" fi - rm -f '/usr/local/bin/gfortran' rm -f '/usr/local/bin/2to3' rm -f '/usr/local/bin/2to3-3.11' rm -f '/usr/local/bin/idle3' @@ -139,7 +114,8 @@ jobs: rm -f '/usr/local/bin/python3.11' rm -f '/usr/local/bin/python3-config' rm -f '/usr/local/bin/python3.11-config' - export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=false # This prevents Homebrew from re-installing R, which will lead to .Platform$pkgType = "source". + rm -f '/usr/local/bin/gfortran' + export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK= # This (the value should actually be empty...) prevents Homebrew from re-installing R, which will lead to .Platform$pkgType = "source". brew install gdal shell: bash @@ -154,34 +130,100 @@ jobs: shell: bash - ## 2c. R packages needed for this yaml script (not related to the Rstox package itself): + ## 2b. R packages needed for this yaml script (not related to the Rstox package itself): - name: Install CRANdependencies run: | - install.packages(c("rcmdcheck", "git2r", "sessioninfo", "knitr", "remotes", "drat")) + install.packages(c("rcmdcheck", "git2r", "sessioninfo", "knitr", "drat")) shell: Rscript {0} - ## 2d. Rstox packages and dependencies (the complicated if condition is needed since the reference to branch name is not consistent across event names). There is the issue that R sorts packge versions alphabetically, while StoX uses semantic versioning. Consequently a pre-release such as 1.2.3-9001 will be considered as newer than the official release 1.2.3 by R. We have solved this by separating the pre-releases and official releases into different repos "unstableRepo" and "testingRepo" for pre-releases and "repo" of official releases). This potentially breaks with remotes::install_deps() as it silently appends the Additional_repositories from the DESCRIPTION file to the repos, but since this would only be a problem if a pre-release is ranked as newer than the official release it will not be a problem when installing dependencies from the "repo" since the Additional_repositories points to that same repo: + ## 2c. Rstox packages and dependencies (the complicated if condition is needed since the reference to branch name is not consistent across event names). There is the issue that R sorts packge versions alphabetically, while StoX uses semantic versioning. Consequently a pre-release such as 1.2.3-9001 will be considered as newer than the official release 1.2.3 by R. We have solved this by separating the pre-releases and official releases into different repos "unstableRepo" and "testingRepo" for pre-releases and "repo" of official releases). This potentially breaks with remotes::install_deps() as it silently appends the Additional_repositories from the DESCRIPTION file to the repos, but since this would only be a problem if a pre-release is ranked as newer than the official release it will not be a problem when installing dependencies from the "repo" since the Additional_repositories points to that same repo: - name: Install R package dependencies from the unstableRepo if: (github.event_name == 'push' && github.ref_name == 'develop') || (github.event_name == 'pull_request' && github.base_ref == 'develop') run: | - remotes::install_deps(dependencies = TRUE, repos = c("https://stoxproject.github.io/unstableRepo/", "https://cloud.r-project.org/")) + # We hard code the list of top level dependencies, since the behavior of remotes::install_deps() that we used before is very unclear (e.g. how is the Additional_repositories included in the list of repos?): + topLevelDeps <- c( + # Imports: + "data.table", + "ggplot2", + "gridExtra", + "methods", + "RColorBrewer", + "rnaturalearth", + "rnaturalearthdata", + "RstoxData", + "RstoxBase", + "sf", + # Suggests: + "knitr", + "rmarkdown", + "tinytest" + ) + install.packages( + topLevelDeps, + dependencies = TRUE, + repos = c("https://stoxproject.github.io/unstableRepo/", "https://cloud.r-project.org/") + ) shell: Rscript {0} - name: Install R package dependencies from the testingRepo if: (github.event_name == 'push' && github.ref_name == 'testing') || (github.event_name == 'pull_request' && github.base_ref == 'testing') run: | - remotes::install_deps(dependencies = TRUE, repos = c("https://stoxproject.github.io/testingRepo/", "https://cloud.r-project.org/")) + # We hard code the list of top level dependencies, since the behavior of remotes::install_deps() that we used before is very unclear (e.g. how is the Additional_repositories included in the list of repos?): + topLevelDeps <- c( + # Imports: + "data.table", + "ggplot2", + "gridExtra", + "methods", + "RColorBrewer", + "rnaturalearth", + "rnaturalearthdata", + "RstoxData", + "RstoxBase", + "sf", + # Suggests: + "knitr", + "rmarkdown", + "tinytest" + ) + install.packages( + topLevelDeps, + dependencies = TRUE, + repos = c("https://stoxproject.github.io/unstableRepo/", "https://cloud.r-project.org/") + ) shell: Rscript {0} - name: Install R package dependencies from the official repo if: (github.event_name == 'push' && github.ref_name == 'master') || (github.event_name == 'pull_request' && github.base_ref == 'master') run: | - remotes::install_deps(dependencies = TRUE, repos = c("https://stoxproject.github.io/repo/", "https://cloud.r-project.org/")) + # We hard code the list of top level dependencies, since the behavior of remotes::install_deps() that we used before is very unclear (e.g. how is the Additional_repositories included in the list of repos?): + topLevelDeps <- c( + # Imports: + "data.table", + "ggplot2", + "gridExtra", + "methods", + "RColorBrewer", + "rnaturalearth", + "rnaturalearthdata", + "RstoxData", + "RstoxBase", + "sf", + # Suggests: + "knitr", + "rmarkdown", + "tinytest" + ) + install.packages( + topLevelDeps, + dependencies = TRUE, + repos = c("https://stoxproject.github.io/unstableRepo/", "https://cloud.r-project.org/") + ) shell: Rscript {0} - ## 2e. Session info: + ## 2d. Session info: - name: Session info run: | options(width = 100) @@ -225,13 +267,12 @@ jobs: - ####################################################### #### 4. Build the package source and binary files: #### ####################################################### - - name: Build package source archive from branches develop, testing and master - if: runner.os == 'Linux' && matrix.config.r == '4.3' && github.event_name == 'push' && (github.ref_name == 'master' || github.ref_name == 'testing' || github.ref_name == 'develop') + - name: Build package source archive from branches develop, testing and master (on Linux for some reason) + if: runner.os == 'Linux' && matrix.config.r == 'release' && github.event_name == 'push' && (github.ref_name == 'master' || github.ref_name == 'testing' || github.ref_name == 'develop') run: | pkgbuild::build(".", dest_path = ".", binary = FALSE) system(paste0("PKG_FREL=", Sys.getenv("PKG_FILE"), " >> ", Sys.getenv("GITHUB_ENV"))) @@ -250,7 +291,6 @@ jobs: - ###################################### #### 5. Deploy to the drat repos: #### ###################################### @@ -291,7 +331,7 @@ jobs: ############################### - name: Create release on GitHub and upload files for testing branch - if: ( (runner.os == 'Windows' && matrix.config.r != 'next') || (runner.os == 'macOS' && matrix.config.r != 'next') || (runner.os == 'Linux' && matrix.config.r == '4.3') ) && github.event_name == 'push' && github.ref_name == 'testing' + if: ( (runner.os == 'Windows') || (runner.os == 'macOS') || (runner.os == 'Linux' && matrix.config.r == 'release') ) && github.event_name == 'push' && github.ref_name == 'testing' uses: ncipollo/release-action@v1 with: allowUpdates: true @@ -302,7 +342,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Create release on GitHub and upload files for master branch - if: ( (runner.os == 'Windows' && matrix.config.r != 'next') || (runner.os == 'macOS' && matrix.config.r != 'next') || (runner.os == 'Linux' && matrix.config.r == '4.3') ) && github.event_name == 'push' && github.ref_name == 'master' + if: ( (runner.os == 'Windows') || (runner.os == 'macOS') || (runner.os == 'Linux' && matrix.config.r == 'release') ) && github.event_name == 'push' && github.ref_name == 'master' uses: ncipollo/release-action@v1 with: allowUpdates: true diff --git a/DESCRIPTION b/DESCRIPTION index 6b84b394..32b106a3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: RstoxFDA -Version: 1.6.0 -Date: 2025-03-18 +Version: 1.7.0-9001 +Date: 2025-09-01 Title: Fisheries Dependent Analysis with RstoX Authors@R: c( person(given = "Edvin", @@ -10,7 +10,7 @@ Authors@R: c( person(given = "Arne Johannes", family = "Holmin", role = "aut")) -Depends: R (>= 4.3) +Depends: R (>= 4.4) Description: Fisheries dependent analysis, including running the Estimated Catch at Age model through the Reca package developed by the Norwegian Computing Center. URL: https://github.com/StoXProject/RstoxFDA @@ -18,6 +18,7 @@ BugReports: https://github.com/StoXProject/RstoxFDA/issues License: LGPL-3 LazyData: true Encoding: UTF-8 +VignetteBuilder: knitr Imports: data.table (>= 1.12.6), ggplot2 (>= 3.2.1), @@ -26,17 +27,13 @@ Imports: RColorBrewer (>= 1.1-2), rnaturalearth (>= 1.0.1), rnaturalearthdata (>= 1.0.0), - RstoxBase (>= 2.1.1), - RstoxData (>= 2.1.1), - sf (>= 1.0.0), - stats (>= 3.5.0), - utils (>= 3.5.0) + RstoxBase (>= 2.2.0-9002), + RstoxData (>= 2.2.0-9002), + sf (>= 1.0.0) Suggests: knitr, - Reca, rmarkdown, tinytest Additional_repositories: https://stoxproject.github.io/repo -VignetteBuilder: knitr RoxygenNote: 7.3.2 diff --git a/NEWS.md b/NEWS.md index e0eb3a4c..df80f0a1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +# RstoxFDA v1.7.0-9001 +* Temporary removing Reca as suggests due to failure to compile on macOS and Windows. +* Pre-generated help HTLM pages using the latest RstoxBuild. + + # RstoxFDA v1.6 * Fixed issue with plotting with other column variables than 'Area' in PlotFisheriesOverviewSpatial (#147) * Fixed ordering of age groups in ReportAnalyticalCatchAtAge (#134) diff --git a/R/StoxAnalysisFunctions.R b/R/StoxAnalysisFunctions.R index 1e4eb72c..5aff7d1c 100644 --- a/R/StoxAnalysisFunctions.R +++ b/R/StoxAnalysisFunctions.R @@ -214,7 +214,7 @@ warnMissingLandings <- function(StoxBiotic, StoxLanding, effects){ #' \code{\link[RstoxFDA]{CarNeighbours}}, mandatory if 'carEffect' is given. #' Identifies which values of the carEffect are to be considered as neighbours. #' @param CellEffect -#' Configures the cell effect. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PrepareRecaEstimate$functionParameterDefaults$CellEffect`. If 'All', an interaction term will be added with all covariates that in the cell (whether they are fixed or random effects). +#' Configures the cell effect. Defaults to `r RstoxFDA::stoxFunctionAttributes$PrepareRecaEstimate$functionParameterDefaults$CellEffect`. If 'All', an interaction term will be added with all covariates that in the cell (whether they are fixed or random effects). #' Any CAR-effect is always included in the cell effect. #' @param UseAgingError #' If TRUE, aging, error parameters will be incorporated in the models. @@ -240,7 +240,7 @@ warnMissingLandings <- function(StoxBiotic, StoxLanding, effects){ #' optional, resolution for length measurements in cm. #' If not provided modal value from data is used. #' @param HatchDay -#' defaults to Defaults to `r RstoxFDA:::stoxFunctionAttributes$PrepareRecaEstimate$functionParameterDefaults$HatchDay`. +#' defaults to Defaults to `r RstoxFDA::stoxFunctionAttributes$PrepareRecaEstimate$functionParameterDefaults$HatchDay`. #' encoding the day of the year when fish is consider to transition from one age to the next. 1 represents Jan 1st. #' @return \code{\link[RstoxFDA]{RecaData}} Data prepared for running Reca. #' @seealso @@ -564,10 +564,10 @@ RunRecaEstimate <- function(RecaData, Nsamples=integer(), Burnin=integer(), Thin #' @param RecaData \code{\link[RstoxFDA]{RecaData}} as returned from \code{\link[RstoxFDA]{PrepareRecaEstimate}} #' @param Nsamples number of MCMC samples that will be made available for \code{\link[Reca]{eca.predict}}. See documentation for \code{\link[Reca]{eca.estimate}}, #' @param Burnin number of MCMC samples run and discarded by \code{\link[Reca]{eca.estimate}} before any samples are saved. See documentation for \code{\link[Reca]{eca.estimate}}. -#' @param Lgamodel The length age relationship to use for length-age fits (options: "log-linear", "non-linear": Schnute-Richards model). See documentation for \code{\link[Reca]{eca.estimate}}. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ParameterizeRecaModels$functionParameterDefaults$Lgamodel` +#' @param Lgamodel The length age relationship to use for length-age fits (options: "log-linear", "non-linear": Schnute-Richards model). See documentation for \code{\link[Reca]{eca.estimate}}. Defaults to `r RstoxFDA::stoxFunctionAttributes$ParameterizeRecaModels$functionParameterDefaults$Lgamodel` #' @param ResultDirectory a directory where Reca may store temp-files \code{\link[Reca]{eca.estimate}} and \code{\link[Reca]{eca.predict}}. See details. -#' @param Thin controls how many iterations are run between each samples saved. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ParameterizeRecaModels$functionParameterDefaults$Thin`. This may be set to account for autocorrelation introduced by Metropolis-Hastings simulation. see documentation for \code{\link[Reca]{eca.estimate}} -#' @param Delta.age see documentation for \code{\link[Reca]{eca.estimate}}. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ParameterizeRecaModels$functionParameterDefaults$Delta.age`. +#' @param Thin controls how many iterations are run between each samples saved. Defaults to `r RstoxFDA::stoxFunctionAttributes$ParameterizeRecaModels$functionParameterDefaults$Thin`. This may be set to account for autocorrelation introduced by Metropolis-Hastings simulation. see documentation for \code{\link[Reca]{eca.estimate}} +#' @param Delta.age see documentation for \code{\link[Reca]{eca.estimate}}. Defaults to `r RstoxFDA::stoxFunctionAttributes$ParameterizeRecaModels$functionParameterDefaults$Delta.age`. #' @param Seed see documentation for \code{\link[Reca]{eca.estimate}}. Defaults to random seed. #' @param UseCachedData if TRUE Parameterization is not run, but any previous runs for exactly the same arguments are returned. #' @return \code{\link[RstoxFDA]{RecaParameterData}} results from Reca Model Parameterization. @@ -738,10 +738,10 @@ getLandingsFromStoxLandings <- function(RecaParameterData, StoxLandingData, Temp #' @param StoxLandingData Landings data (\code{\link[RstoxData]{StoxLandingData}}). #' @param GroupingVariables character vector identifying columns in 'StoxLandingData' that results should be provided for. #' @param TemporalResolution -#' Code for temporal resolution in landings: "Month" or "Quarter". Defaults to `r RstoxFDA:::stoxFunctionAttributes$RunRecaModels$functionParameterDefaults$TemporalResolution`. +#' Code for temporal resolution in landings: "Month" or "Quarter". Defaults to `r RstoxFDA::stoxFunctionAttributes$RunRecaModels$functionParameterDefaults$TemporalResolution`. #' Regulates temporal resolution for calculating fractional ages of fish. #' Not to be confused with any temporal covariate. -#' @param Caa.burnin see documentation for \code{\link[Reca]{eca.predict}}. Defaults to `r RstoxFDA:::stoxFunctionAttributes$RunRecaModels$functionParameterDefaults$Caa.burnin`. +#' @param Caa.burnin see documentation for \code{\link[Reca]{eca.predict}}. Defaults to `r RstoxFDA::stoxFunctionAttributes$RunRecaModels$functionParameterDefaults$Caa.burnin`. #' @param CollapseLength indicates whether length groups should be collapsed in result. Defaults to TRUE. See details. #' @return \code{\link[RstoxFDA]{RecaCatchAtAge}} #' @seealso \code{\link[RstoxFDA]{ParameterizeRecaModels}} for model parameterisation, diff --git a/R/StoxBaselineFunctions.R b/R/StoxBaselineFunctions.R index 42f5081a..0305aa18 100644 --- a/R/StoxBaselineFunctions.R +++ b/R/StoxBaselineFunctions.R @@ -715,7 +715,7 @@ appendTemporal <- function(table, temporalColumn, temporalDefinition, datecolumn #' two choices are offered for the name of the added column (see argument 'ColumnName'). #' @param StoxLandingData \code{\link[RstoxData]{StoxLandingData}} data which will be annotated. #' @param TemporalDefinition \code{\link[RstoxFDA]{TemporalDefinition}} definition of temporal category. -#' @param ColumnName Name of the added column. Defaults to `r RstoxFDA:::stoxFunctionAttributes$AddPeriodStoxLanding$functionParameterDefaults$ColumnName`. +#' @param ColumnName Name of the added column. Defaults to `r RstoxFDA::stoxFunctionAttributes$AddPeriodStoxLanding$functionParameterDefaults$ColumnName`. #' @return StoxLandingData with column appended. See \code{\link[RstoxData]{StoxLandingData}}. #' @seealso #' \code{\link[RstoxFDA]{DefinePeriod}} for configuring the temporal definition, @@ -756,7 +756,7 @@ AddPeriodStoxLanding <- function(StoxLandingData, TemporalDefinition, ColumnName #' \code{\link[RstoxFDA]{DefinePeriod}} #' @param StoxBioticData \code{\link[RstoxData]{StoxLandingData}} data which will be annotated with period. #' @param TemporalDefinition \code{\link[RstoxFDA]{TemporalDefinition}} definition of temporal category. -#' @param ColumnName specifies which column the area should be added to. Defaults to `r RstoxFDA:::stoxFunctionAttributes$AddPeriodStoxBiotic$functionParameterDefaults$ColumnName`. +#' @param ColumnName specifies which column the area should be added to. Defaults to `r RstoxFDA::stoxFunctionAttributes$AddPeriodStoxBiotic$functionParameterDefaults$ColumnName`. #' @return StoxBioticData with column appended. See \code{\link[RstoxData]{StoxBioticData}}. #' \code{\link[RstoxFDA]{DefinePeriod}} for configuring the temporal definition, #' \code{\link[RstoxFDA]{AddStratumStoxLanding}} for similar function for landing data, @@ -804,7 +804,7 @@ AddPeriodStoxBiotic <- function(StoxBioticData, TemporalDefinition, ColumnName=c #' \code{\link[RstoxFDA]{AddAreaPositionStoxLanding}} may be used to append positions, based on area codes. #' @param StoxLandingData \code{\link[RstoxData]{StoxLandingData}} data which will be annotated. Needs postions appended. See details. #' @param StratumPolygon Definition of spatial strata. See \code{\link[RstoxBase]{StratumPolygon}} -#' @param ColumnName specifies which column the area should be added to. See details. Defaults to `r RstoxFDA:::stoxFunctionAttributes$AddStratumStoxLanding$functionParameterDefaults$ColumnName`. +#' @param ColumnName specifies which column the area should be added to. See details. Defaults to `r RstoxFDA::stoxFunctionAttributes$AddStratumStoxLanding$functionParameterDefaults$ColumnName`. #' @return StoxLandingData with column appended. See \code{\link[RstoxData]{StoxLandingData}}. #' @seealso \code{\link[RstoxBase]{DefineStratumPolygon}} for configuring stratum definitions. #' \code{\link[RstoxFDA]{AddAreaPositionStoxLanding}} for adding positions to landings, @@ -854,7 +854,7 @@ AddStratumStoxLanding <- function(StoxLandingData, StratumPolygon, ColumnName=ch #' The strata are added to the new column 'Stratum'. #' @param StoxBioticData \code{\link[RstoxData]{StoxBioticData}} data which will be annotated. Needs postions appended. See details. #' @param StratumPolygon Definition of spatial strata. See \code{\link[RstoxBase]{StratumPolygon}} -#' @param ColumnName specifies which column the area should be added to. Defaults to `r RstoxFDA:::stoxFunctionAttributes$AddStratumStoxBiotic$functionParameterDefaults$ColumnName`. +#' @param ColumnName specifies which column the area should be added to. Defaults to `r RstoxFDA::stoxFunctionAttributes$AddStratumStoxBiotic$functionParameterDefaults$ColumnName`. #' @return StoxBioticData with column appended to data.table 'Station'. See \code{\link[RstoxData]{StoxBioticData}}. #' @seealso \code{\link[RstoxBase]{DefineStratumPolygon}} for configuring stratum definitions. #' \code{\link[RstoxFDA]{AddStratumStoxLanding}} for similar function for landing data, @@ -873,7 +873,7 @@ AddStratumStoxBiotic <- function(StoxBioticData, StratumPolygon, ColumnName=char checkBioticNotEmpty(StoxBioticData, "Station") checkMandatory(StratumPolygon) - columnName <- getDefault(ColumnName, "ColumnName", F, RstoxFDA:::stoxFunctionAttributes$AddStratumStoxBiotic$functionParameterDefaults$ColumnName) + columnName <- getDefault(ColumnName, "ColumnName", F, RstoxFDA::stoxFunctionAttributes$AddStratumStoxBiotic$functionParameterDefaults$ColumnName) missing <- StoxBioticData$Station[is.na(StoxBioticData$Station$Latitude) | is.na(StoxBioticData$Station$Longitude),] if (nrow(missing) > 0){ @@ -1080,7 +1080,7 @@ SetTimeBiotic <- function(BioticData, Time=character(), Overwrite=F){ #' #' @param BioticData \code{\link[RstoxData]{BioticData}} data for which short gear codes should be set #' @return \code{\link[RstoxData]{BioticData}} -#' @seealso \code{\link{RstoxData}{RstoxData::StoxBiotic}} For converting \code{\link[RstoxData]{BioticData}} to \code{\link[RstoxData]{StoxBioticData}}. +#' @seealso \code{\link[RstoxData]{StoxBiotic}} For converting \code{\link[RstoxData]{BioticData}} to \code{\link[RstoxData]{StoxBioticData}}. #' @concept nmdbiotic functions #' @concept gear coding functions #' @concept StoX-functions diff --git a/R/StoxPlots.R b/R/StoxPlots.R index 9d92d8bb..db6d568e 100644 --- a/R/StoxPlots.R +++ b/R/StoxPlots.R @@ -229,16 +229,16 @@ PlotFisheriesOverviewTable <- function(ReportFdaLandingData){ #' #' @param ReportFdaSamplingData \code{\link[RstoxFDA]{ReportFdaSamplingData}} with sampling report to plot #' @param ColumnVariable The grouping variable in 'ReportFdaSamplingData' that should be used for columns in the cell plot -#' @param Measurement The kind of fish measurement that should be used to determine the color of a cell. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$Measurement`. +#' @param Measurement The kind of fish measurement that should be used to determine the color of a cell. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$Measurement`. #' @param UseDefaultColorSettings Logical, whether to use default color settings or the value specified for the function parameters MinVessels, MinCatches, MinMeasurements, ColorNoSamples, ColorFewCatches, ColorFewVessels, ColorGoodSampling -#' @param MinVessels The minimum number of vessels sampled for a quality "Good" coloring of a cell. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$MinVessels`. -#' @param MinCatches The minimum number of catches sampled for quality "Good" or "Few vessels" coloring of a cell. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$MinCatches`. -#' @param MinMeasurements The minimum number of measurements (parameter 'Measurement') for quality "Good", "Few vessels" or "Few catches" coloring of a cell. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$MinMeasurements`. -#' @param ColorNoSamples Color to use for cells not sampled. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$ColorNoSamples`. -#' @param ColorFewMeasurements Color to use for cells with few measurements. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$ColorFewMeasurements`. -#' @param ColorFewCatches Color to use for cells with Few Catches. See details. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$ColorFewCatches`. -#' @param ColorFewVessels Color to use for cells with Few Vessels See details. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$ColorFewVessels`. -#' @param ColorGoodSampling Color to use for cells with Good sampling. See details. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$ColorGoodSampling`. +#' @param MinVessels The minimum number of vessels sampled for a quality "Good" coloring of a cell. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$MinVessels`. +#' @param MinCatches The minimum number of catches sampled for quality "Good" or "Few vessels" coloring of a cell. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$MinCatches`. +#' @param MinMeasurements The minimum number of measurements (parameter 'Measurement') for quality "Good", "Few vessels" or "Few catches" coloring of a cell. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$MinMeasurements`. +#' @param ColorNoSamples Color to use for cells not sampled. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$ColorNoSamples`. +#' @param ColorFewMeasurements Color to use for cells with few measurements. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$ColorFewMeasurements`. +#' @param ColorFewCatches Color to use for cells with Few Catches. See details. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$ColorFewCatches`. +#' @param ColorFewVessels Color to use for cells with Few Vessels See details. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$ColorFewVessels`. +#' @param ColorGoodSampling Color to use for cells with Good sampling. See details. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$ColorGoodSampling`. #' @param TextSize size of text in cellplot. If not provided, a suitable size will be calculated. #' @return \code{\link[RstoxFDA]{PlotSamplingOverviewCellData}} #' @seealso Provide data for this plot with \code{\link[RstoxFDA]{ReportFdaSampling}} @@ -385,21 +385,21 @@ PlotSamplingOverviewCell <- function(ReportFdaSamplingData, ColumnVariable, Meas #' @param ReportFdaSamplingData \code{\link[RstoxFDA]{ReportFdaSamplingData}} with sampling report to plot #' @param Cumulative logical indicating if the cumulative fraction of the landed weight should be plotted on a secondary axis. #' @param OtherPercentage Controls how many bars are shown. The smallest 'OtherPercentage' % bars are combined into one bar. -#' @param ColorScheme 'CellPlot' or 'Gradient'. See details. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$ColorScheme`. -#' @param Measurement The kind of fish measurement that should be used to determine the color of a cell. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$Measurement`. +#' @param ColorScheme 'CellPlot' or 'Gradient'. See details. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$ColorScheme`. +#' @param Measurement The kind of fish measurement that should be used to determine the color of a cell. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$Measurement`. #' @param UseDefaultColorSettings Logical, whether to use default color settings or the values specified in other arguments to this function. #' @param MinVessels For color scheme "CellPlot". The minimum number of vessels sampled for a quality "Good" coloring of a cell. Defaults to 2. #' @param MinCatches color scheme "CellPlot". The minimum number of catches sampled for quality "Good" or "Few vessels" coloring of a cell. Defaults to 2. #' @param MinMeasurements color scheme "CellPlot". The minimum number of measurements (parameter 'Measurement') for quality "Good", "Few vessels" or "Few catches" coloring of a cell. Defaults to 100. -#' @param ColorNoSamples Color to use for cells not sampled. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$ColorNoSamples`. -#' @param ColorFewMeasurements Color to use for cells with few measurements. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$ColorFewMeasurements`. -#' @param ColorFewCatches Color to use for cells with Few Catches. See details. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$ColorFewCatches`. -#' @param ColorFewVessels Color to use for cells with Few Vessels See details. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$ColorFewVessels`. -#' @param ColorGoodSampling Color to use for cells with Good sampling. See details. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$ColorGoodSampling`. +#' @param ColorNoSamples Color to use for cells not sampled. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$ColorNoSamples`. +#' @param ColorFewMeasurements Color to use for cells with few measurements. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$ColorFewMeasurements`. +#' @param ColorFewCatches Color to use for cells with Few Catches. See details. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$ColorFewCatches`. +#' @param ColorFewVessels Color to use for cells with Few Vessels See details. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$ColorFewVessels`. +#' @param ColorGoodSampling Color to use for cells with Good sampling. See details. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$ColorGoodSampling`. #' @param SamplingUnit color scheme "Gradient". The sampling unit used: "Vessels","Catches", or "Measurement" -#' @param GradientLowColor Color to use for low end of color gradient. See details. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$GradientLowColor`. -#' @param GradientMidColor Color to use for middle of color gradient. See details. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$GradientMidColor`. -#' @param GradientHighColor Color to use for high end of color gradient. See details. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$GradientHighColor`. +#' @param GradientLowColor Color to use for low end of color gradient. See details. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$GradientLowColor`. +#' @param GradientMidColor Color to use for middle of color gradient. See details. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$GradientMidColor`. +#' @param GradientHighColor Color to use for high end of color gradient. See details. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$GradientHighColor`. #' @return \code{\link[RstoxFDA]{PlotSamplingCoverageData}} #' @seealso Provide data for this plot with \code{\link[RstoxFDA]{ReportFdaSampling}} #' @concept StoX-functions @@ -863,16 +863,16 @@ PlotCatchAtAgeCovariances <- function(ReportFdaCatchAtAgeCovarianceData){ #' That analysis checks the convergence of model parameters, rather than the estimated parameters, #' and supports handling a large number of model parameters, and filter out indications of non-convergence. #' @param RecaCatchAtAge Results from MCMC simulations (\code{\link[RstoxFDA]{RecaCatchAtAge}}). -#' @param Parameter which parameter plot traceplots for "TotalCatch", "MeanLength", or "MeanWeight", Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$TotalCatch` +#' @param Parameter which parameter plot traceplots for "TotalCatch", "MeanLength", or "MeanWeight", Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$TotalCatch` #' @param PlusGroup If given, ages 'PlusGroup' or older are included in a plus group. #' @param LengthInterval width of length bins in cm, for TotalCatch traceplots. If not provided, length inteval will be set to the maximum length group.. #' @param UseDefaultPlotSettings if TRUE default plot settings are used, rather than the values provided by Nclust, Iter.max, Nstart, LowerQuant, UpperQuant, CatLimit, and Legend -#' @param Nclust the number of plots to distribute the ages and plus group on. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$Nclust`. -#' @param Iter.max maximal number of iterations for k-means clustering deciding which ages are plotted in same plot. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$Iter.max`. -#' @param Nstart the number of random sets chosen for the k-means clustering. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$Nstart`. -#' @param LowerQuant lower quantile in each age group to plot as points. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$LowerLuant`. -#' @param UpperQuant upper quantile in each age group to plot as points. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$UpperQuant`. -#' @param CatLimit the upper limit for number of ages in a plot using categorical coloring. Plots with more than this number of age greoups will use a gradient coloring scheme. Defaults to `r RstoxFDA:::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$CatLimit`. +#' @param Nclust the number of plots to distribute the ages and plus group on. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$Nclust`. +#' @param Iter.max maximal number of iterations for k-means clustering deciding which ages are plotted in same plot. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$Iter.max`. +#' @param Nstart the number of random sets chosen for the k-means clustering. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$Nstart`. +#' @param LowerQuant lower quantile in each age group to plot as points. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$LowerLuant`. +#' @param UpperQuant upper quantile in each age group to plot as points. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$UpperQuant`. +#' @param CatLimit the upper limit for number of ages in a plot using categorical coloring. Plots with more than this number of age greoups will use a gradient coloring scheme. Defaults to `r RstoxFDA::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$CatLimit`. #' @param Legend If true legend will be plotted. #' @return \code{\link[RstoxFDA]{PlotPosteriorTracesData}} #' @concept StoX-functions diff --git a/R/StoxReportFunctions.R b/R/StoxReportFunctions.R index ab227ce4..b845063a 100644 --- a/R/StoxReportFunctions.R +++ b/R/StoxReportFunctions.R @@ -38,8 +38,8 @@ check_intervalWidth <- function(intervalwidth){ #' \code{\link[RstoxData]{StoxLandingData}} data with landings from fisheries #' and approriate columns added for identifying corresponding samples #' @param GroupingVariables Columns of 'StoxBioticData' and 'StoxLandingData' that partitions the fisheries. If not provided, a single row for all landings will be produced. -#' @param Decimals integer specifying the number of decimals to report for 'LandedRoundWeight' and 'WeightOfSampledCatches'. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ReportFdaSampling$functionParameterDefaults$Decimals`. -#' @param Unit unit for the weights 'LandedRoundWeight' and 'WeightOfSampledCatches'. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ReportFdaSampling$functionParameterDefaults$Unit` +#' @param Decimals integer specifying the number of decimals to report for 'LandedRoundWeight' and 'WeightOfSampledCatches'. Defaults to `r RstoxFDA::stoxFunctionAttributes$ReportFdaSampling$functionParameterDefaults$Decimals`. +#' @param Unit unit for the weights 'LandedRoundWeight' and 'WeightOfSampledCatches'. Defaults to `r RstoxFDA::stoxFunctionAttributes$ReportFdaSampling$functionParameterDefaults$Unit` #' @param SamplingVariables Columns of 'StoxBioticData' identifying sampling variables to be use to partition the report. See details. #' @return \code{\link[RstoxFDA]{ReportFdaSamplingData}} #' @concept landings functions @@ -186,8 +186,8 @@ ReportFdaSampling <- function(StoxBioticData, StoxLandingData, GroupingVariables #' \code{\link[RstoxData]{StoxLandingData}} data with landings from fisheries #' and approriate columns added for identifying corresponding samples #' @param GroupingVariables Columns of 'StoxBioticData' and 'StoxLandingData' that partitions the fisheries. If not provided, a single row for all landings will be produced. -#' @param Decimals integer specifying the number of decimals to report for 'LandedRoundWeight' and 'WeightOfSampledCatches'. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ReportFdaLandings$functionParameterDefaults$Decimals`. -#' @param Unit unit for the weights 'LandedRoundWeight' and 'WeightOfSampledCatches'. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ReportFdaLandings$functionParameterDefaults$Unit`. +#' @param Decimals integer specifying the number of decimals to report for 'LandedRoundWeight' and 'WeightOfSampledCatches'. Defaults to `r RstoxFDA::stoxFunctionAttributes$ReportFdaLandings$functionParameterDefaults$Decimals`. +#' @param Unit unit for the weights 'LandedRoundWeight' and 'WeightOfSampledCatches'. Defaults to `r RstoxFDA::stoxFunctionAttributes$ReportFdaLandings$functionParameterDefaults$Unit`. #' @return \code{\link[RstoxFDA]{ReportFdaLandingData}} #' @concept landings functions #' @concept StoX-functions @@ -440,8 +440,8 @@ setLengthGroup <- function(LengthReport, interval){ #' The units considered valid for catch at age in numbers are those listed for quantity 'cardinaltiy' in \code{\link[RstoxData]{StoxUnits}} #' @param RecaCatchAtAge Results from MCMC simulations (\code{\link[RstoxFDA]{RecaCatchAtAge}}). #' @param PlusGroup If given, ages 'PlusGroup' or older are included in a plus group. -#' @param IntervalWidth The width of the reported credible interval. A value of 0.9 gives 90 per cent credible intervals. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ReportRecaCatchAtAge$functionParameterDefaults$IntervalWidth` -#' @param Decimals integer specifying the number of decimals to report for 'CatchAtAge', 'SD', 'Low' and 'High'. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ReportRecaCatchAtAge$functionParameterDefaults$Decimals`. +#' @param IntervalWidth The width of the reported credible interval. A value of 0.9 gives 90 per cent credible intervals. Defaults to `r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchAtAge$functionParameterDefaults$IntervalWidth` +#' @param Decimals integer specifying the number of decimals to report for 'CatchAtAge', 'SD', 'Low' and 'High'. Defaults to `r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchAtAge$functionParameterDefaults$Decimals`. #' @param Unit unit for 'CatchAtAge', 'SD', 'Low' and 'High' #' @return \code{\link[RstoxFDA]{ReportFdaCatchAtAgeData}} #' @seealso \code{\link[RstoxFDA]{RunRecaModels}} for running Reca-analysis and \code{\link[RstoxFDA]{ReportRecaCatchAtLength}} for reporting length composition. @@ -518,7 +518,7 @@ ReportRecaCatchAtAge <- function(RecaCatchAtAge, PlusGroup=integer(), IntervalWi #' The units considered valid for catch at age in numbers are those listed for quantity 'cardinaltiy' in \code{\link[RstoxData]{StoxUnits}} #' @param RecaCatchAtAge Results from MCMC simulations (\code{\link[RstoxFDA]{RecaCatchAtAge}}). #' @param PlusGroup If given, ages 'PlusGroup' or older are included in a plus group. -#' @param Decimals integer specifying the number of decimals to report for 'Covariance'. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ReportRecaCatchAtAgeCovariance$functionParameterDefaults$Decimals`. +#' @param Decimals integer specifying the number of decimals to report for 'Covariance'. Defaults to `r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchAtAgeCovariance$functionParameterDefaults$Decimals`. #' @param Unit unit for 'CatchAtAge'. Covariance will be provided as the square of this unit. #' @return \code{\link[RstoxFDA]{ReportFdaCatchAtAgeCovarianceData}} #' @seealso \code{\link[RstoxFDA]{RunRecaModels}} for running Reca-analysis and \code{\link[RstoxFDA]{ReportRecaCatchAtLength}} for reporting length composition. @@ -599,8 +599,8 @@ ReportRecaCatchAtAgeCovariance <- function(RecaCatchAtAge, PlusGroup=integer(), #' #' The units considered valid for catch at length in numbers are those listed for quantity 'cardinaltiy' in \code{\link[RstoxData]{StoxUnits}} #' @param RecaCatchAtAge Results from MCMC simulations (\code{\link[RstoxFDA]{RecaCatchAtAge}}). -#' @param IntervalWidth The width of the reported credible interval. A value of 0.9 gives 90 per cent credible intervals. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ReportRecaCatchAtLength$functionParameterDefaults$IntervalWidth`. -#' @param Decimals integer specifying the number of decimals to report for 'CatchAtLength', 'SD', 'Low' and 'High'. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ReportRecaCatchAtLength$functionParameterDefaults$Decimals`. +#' @param IntervalWidth The width of the reported credible interval. A value of 0.9 gives 90 per cent credible intervals. Defaults to `r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchAtLength$functionParameterDefaults$IntervalWidth`. +#' @param Decimals integer specifying the number of decimals to report for 'CatchAtLength', 'SD', 'Low' and 'High'. Defaults to `r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchAtLength$functionParameterDefaults$Decimals`. #' @param Unit unit for 'CatchAtLength', 'SD', 'Low' and 'High' #' @param LengthInterval width of length bins in cm. If not provided, the interval in 'RecaCatchAtAge' will be used. #' @return \code{\link[RstoxFDA]{ReportFdaCatchAtLengthData}} @@ -987,18 +987,18 @@ ReportRecaLengthAtAge <- function(RecaCatchAtAge, PlusGroup=integer(), IntervalW #' Rounding of numbers according to the argument 'Decimals' is done with \code{\link[base]{round}}, #' so that negative numbers specify rounding to powers of ten, and rounding of the digit 5 is towards the even digit. #' @param RecaCatchAtAge Results from MCMC simulations (\code{\link[RstoxFDA]{RecaCatchAtAge}}). -#' @param IntervalWidth The width of the reported credible interval. A value to 0.9 gives 90 per cent credible intervals. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$IntervalWidth`. +#' @param IntervalWidth The width of the reported credible interval. A value to 0.9 gives 90 per cent credible intervals. Defaults to `r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$IntervalWidth`. #' @param UseDefaultDecimalOptions logical determining whether to use default decimal options. -#' @param DecimalTotalNumber integer specifying the number of decimals to report for 'TotalNumber', and the corresponding 'SD', 'Low' and 'High'. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$DecimalTotalNumber`. -#' @param DecimalTotalWeight integer specifying the number of decimals to report for 'TotalWeightDefaults', and the corresponding 'SD', 'Low' and 'High'. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$DecimalTotalWeight`. -#' @param DecimalMeanAge integer specifying the number of decimals to report for 'MeanIndividualAge', and the corresponding 'SD', 'Low' and 'High'. `r RstoxFDA:::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$DecimalMeanAge`. -#' @param DecimalMeanWeight integer specifying the number of decimals to report for 'MeanIndividualWeight', and the corresponding 'SD', 'Low' and 'High'. `r RstoxFDA:::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$DecimalMeanWeight`. -#' @param DecimalMeanLength integer specifying the number of decimals to report for 'MeanIndividualLength', and the corresponding 'SD', 'Low' and 'High'.`r RstoxFDA:::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$DecimalMeanLength`. +#' @param DecimalTotalNumber integer specifying the number of decimals to report for 'TotalNumber', and the corresponding 'SD', 'Low' and 'High'. Defaults to `r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$DecimalTotalNumber`. +#' @param DecimalTotalWeight integer specifying the number of decimals to report for 'TotalWeightDefaults', and the corresponding 'SD', 'Low' and 'High'. Defaults to `r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$DecimalTotalWeight`. +#' @param DecimalMeanAge integer specifying the number of decimals to report for 'MeanIndividualAge', and the corresponding 'SD', 'Low' and 'High'. `r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$DecimalMeanAge`. +#' @param DecimalMeanWeight integer specifying the number of decimals to report for 'MeanIndividualWeight', and the corresponding 'SD', 'Low' and 'High'. `r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$DecimalMeanWeight`. +#' @param DecimalMeanLength integer specifying the number of decimals to report for 'MeanIndividualLength', and the corresponding 'SD', 'Low' and 'High'.`r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$DecimalMeanLength`. #' @param UseDefaultUnitOptions logical determining whether to use default unit options. -#' @param UnitTotalNumber unit for total catch in numbers. `r RstoxFDA:::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$UnitTotalNumber`. -#' @param UnitTotalWeight unit for weight of total catch. `r RstoxFDA:::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$UnitTotalWeight`. -#' @param UnitMeanWeight unit for mean weight. `r RstoxFDA:::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$UnitMeanWeight`. -#' @param UnitMeanLength unit for mean length. `r RstoxFDA:::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$UnitMeanLength`. +#' @param UnitTotalNumber unit for total catch in numbers. `r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$UnitTotalNumber`. +#' @param UnitTotalWeight unit for weight of total catch. `r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$UnitTotalWeight`. +#' @param UnitMeanWeight unit for mean weight. `r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$UnitMeanWeight`. +#' @param UnitMeanLength unit for mean length. `r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$UnitMeanLength`. #' @return \code{\link[RstoxFDA]{ReportFdaSummaryData}} #' @seealso #' \code{\link[RstoxFDA]{RunRecaModels}} for running Reca-analysis @@ -1173,8 +1173,8 @@ ReportRecaCatchStatistics <- function(RecaCatchAtAge, IntervalWidth=numeric(), #' @param StoxLandingData #' \code{\link[RstoxData]{StoxLandingData}} data with landings from fisheries #' @param GroupingVariables Columns of 'StoxLandingData' that partitions the landings into groups SOP tests should be reported for. -#' @param DecimalWeight integer specifying the number of decimals to report for weights: 'TotalWeightEstimated', 'LandedWeight', and 'Difference'. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ReportFdaSOP$functionParameterDefaults$DecimalWeight`. -#' @param DecimalFraction integer specifying the number of decimals to report for 'RelativeDifference'. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ReportFdaSOP$functionParameterDefaults$DecimalFraction`. +#' @param DecimalWeight integer specifying the number of decimals to report for weights: 'TotalWeightEstimated', 'LandedWeight', and 'Difference'. Defaults to `r RstoxFDA::stoxFunctionAttributes$ReportFdaSOP$functionParameterDefaults$DecimalWeight`. +#' @param DecimalFraction integer specifying the number of decimals to report for 'RelativeDifference'. Defaults to `r RstoxFDA::stoxFunctionAttributes$ReportFdaSOP$functionParameterDefaults$DecimalFraction`. #' @param UnitFraction unit for the RelativeDifference. E.g. '0.' for decimal notation or '\%' for percent. #' @return \code{\link[RstoxFDA]{ReportFdaSopData}} #' @seealso @@ -1506,8 +1506,8 @@ crossChainConvergence <- function(modelSummary, iterations, tolerance){ #' In the report InterVariance correspond to their B/n and #' IntraVariance correspond to their W. #' @param ParameterizationSummaryData summary statistics for Reca parameters -#' @param Tolerance threshold for reporting parameters. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ReportParameterConvergence$functionParameterDefaults$Tolerance`. See details -#' @param Decimals integer specifying the number of decimals to report for 'GelmanRubinR'. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ReportParameterConvergence$functionParameterDefaults$Decimals`. +#' @param Tolerance threshold for reporting parameters. Defaults to `r RstoxFDA::stoxFunctionAttributes$ReportParameterConvergence$functionParameterDefaults$Tolerance`. See details +#' @param Decimals integer specifying the number of decimals to report for 'GelmanRubinR'. Defaults to `r RstoxFDA::stoxFunctionAttributes$ReportParameterConvergence$functionParameterDefaults$Decimals`. #' @return \code{\link[RstoxFDA]{ParameterConvergenceData}} #' @export #' @concept StoX-functions diff --git a/inst/extdata/functionArguments.rds b/inst/extdata/functionArguments.rds index 7d9f19c7..648393a6 100644 Binary files a/inst/extdata/functionArguments.rds and b/inst/extdata/functionArguments.rds differ diff --git a/man/AddPeriodStoxBiotic.Rd b/man/AddPeriodStoxBiotic.Rd index 7c0e8689..83c0bf0f 100644 --- a/man/AddPeriodStoxBiotic.Rd +++ b/man/AddPeriodStoxBiotic.Rd @@ -15,7 +15,7 @@ AddPeriodStoxBiotic( \item{TemporalDefinition}{\code{\link[RstoxFDA]{TemporalDefinition}} definition of temporal category.} -\item{ColumnName}{specifies which column the area should be added to. Defaults to Period.} +\item{ColumnName}{specifies which column the area should be added to. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$AddPeriodStoxBiotic$functionParameterDefaults$ColumnName}.} } \value{ StoxBioticData with column appended. See \code{\link[RstoxData]{StoxBioticData}}. diff --git a/man/AddPeriodStoxLanding.Rd b/man/AddPeriodStoxLanding.Rd index ce1893af..d7a105e4 100644 --- a/man/AddPeriodStoxLanding.Rd +++ b/man/AddPeriodStoxLanding.Rd @@ -15,7 +15,7 @@ AddPeriodStoxLanding( \item{TemporalDefinition}{\code{\link[RstoxFDA]{TemporalDefinition}} definition of temporal category.} -\item{ColumnName}{Name of the added column. Defaults to Period.} +\item{ColumnName}{Name of the added column. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$AddPeriodStoxLanding$functionParameterDefaults$ColumnName}.} } \value{ StoxLandingData with column appended. See \code{\link[RstoxData]{StoxLandingData}}. diff --git a/man/AddStratumStoxBiotic.Rd b/man/AddStratumStoxBiotic.Rd index 38e64b61..3a3e3cfc 100644 --- a/man/AddStratumStoxBiotic.Rd +++ b/man/AddStratumStoxBiotic.Rd @@ -11,7 +11,7 @@ AddStratumStoxBiotic(StoxBioticData, StratumPolygon, ColumnName = character()) \item{StratumPolygon}{Definition of spatial strata. See \code{\link[RstoxBase]{StratumPolygon}}} -\item{ColumnName}{specifies which column the area should be added to. Defaults to Stratum.} +\item{ColumnName}{specifies which column the area should be added to. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$AddStratumStoxBiotic$functionParameterDefaults$ColumnName}.} } \value{ StoxBioticData with column appended to data.table 'Station'. See \code{\link[RstoxData]{StoxBioticData}}. diff --git a/man/AddStratumStoxLanding.Rd b/man/AddStratumStoxLanding.Rd index 6d39662b..7e56432d 100644 --- a/man/AddStratumStoxLanding.Rd +++ b/man/AddStratumStoxLanding.Rd @@ -15,7 +15,7 @@ AddStratumStoxLanding( \item{StratumPolygon}{Definition of spatial strata. See \code{\link[RstoxBase]{StratumPolygon}}} -\item{ColumnName}{specifies which column the area should be added to. See details. Defaults to Stratum.} +\item{ColumnName}{specifies which column the area should be added to. See details. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$AddStratumStoxLanding$functionParameterDefaults$ColumnName}.} } \value{ StoxLandingData with column appended. See \code{\link[RstoxData]{StoxLandingData}}. diff --git a/man/ParameterizeRecaModels.Rd b/man/ParameterizeRecaModels.Rd index 08661aac..0c34ffd2 100644 --- a/man/ParameterizeRecaModels.Rd +++ b/man/ParameterizeRecaModels.Rd @@ -23,13 +23,13 @@ ParameterizeRecaModels( \item{Burnin}{number of MCMC samples run and discarded by \code{\link[Reca]{eca.estimate}} before any samples are saved. See documentation for \code{\link[Reca]{eca.estimate}}.} -\item{Thin}{controls how many iterations are run between each samples saved. Defaults to 0. This may be set to account for autocorrelation introduced by Metropolis-Hastings simulation. see documentation for \code{\link[Reca]{eca.estimate}}} +\item{Thin}{controls how many iterations are run between each samples saved. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$ParameterizeRecaModels$functionParameterDefaults$Thin}. This may be set to account for autocorrelation introduced by Metropolis-Hastings simulation. see documentation for \code{\link[Reca]{eca.estimate}}} \item{ResultDirectory}{a directory where Reca may store temp-files \code{\link[Reca]{eca.estimate}} and \code{\link[Reca]{eca.predict}}. See details.} -\item{Lgamodel}{The length age relationship to use for length-age fits (options: "log-linear", "non-linear": Schnute-Richards model). See documentation for \code{\link[Reca]{eca.estimate}}. Defaults to log-linear} +\item{Lgamodel}{The length age relationship to use for length-age fits (options: "log-linear", "non-linear": Schnute-Richards model). See documentation for \code{\link[Reca]{eca.estimate}}. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$ParameterizeRecaModels$functionParameterDefaults$Lgamodel}} -\item{Delta.age}{see documentation for \code{\link[Reca]{eca.estimate}}. Defaults to 0.001.} +\item{Delta.age}{see documentation for \code{\link[Reca]{eca.estimate}}. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$ParameterizeRecaModels$functionParameterDefaults$Delta.age}.} \item{Seed}{see documentation for \code{\link[Reca]{eca.estimate}}. Defaults to random seed.} diff --git a/man/PlotPosteriorTraces.Rd b/man/PlotPosteriorTraces.Rd index 5d3fbeb8..826e96ba 100644 --- a/man/PlotPosteriorTraces.Rd +++ b/man/PlotPosteriorTraces.Rd @@ -22,7 +22,7 @@ PlotPosteriorTraces( \arguments{ \item{RecaCatchAtAge}{Results from MCMC simulations (\code{\link[RstoxFDA]{RecaCatchAtAge}}).} -\item{Parameter}{which parameter plot traceplots for "TotalCatch", "MeanLength", or "MeanWeight", Defaults to} +\item{Parameter}{which parameter plot traceplots for "TotalCatch", "MeanLength", or "MeanWeight", Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$TotalCatch}} \item{PlusGroup}{If given, ages 'PlusGroup' or older are included in a plus group.} @@ -30,17 +30,17 @@ PlotPosteriorTraces( \item{UseDefaultPlotSettings}{if TRUE default plot settings are used, rather than the values provided by Nclust, Iter.max, Nstart, LowerQuant, UpperQuant, CatLimit, and Legend} -\item{Nclust}{the number of plots to distribute the ages and plus group on. Defaults to 4.} +\item{Nclust}{the number of plots to distribute the ages and plus group on. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$Nclust}.} -\item{Iter.max}{maximal number of iterations for k-means clustering deciding which ages are plotted in same plot. Defaults to 20.} +\item{Iter.max}{maximal number of iterations for k-means clustering deciding which ages are plotted in same plot. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$Iter.max}.} -\item{Nstart}{the number of random sets chosen for the k-means clustering. Defaults to 10.} +\item{Nstart}{the number of random sets chosen for the k-means clustering. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$Nstart}.} -\item{LowerQuant}{lower quantile in each age group to plot as points. Defaults to .} +\item{LowerQuant}{lower quantile in each age group to plot as points. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$LowerLuant}.} -\item{UpperQuant}{upper quantile in each age group to plot as points. Defaults to 0.95.} +\item{UpperQuant}{upper quantile in each age group to plot as points. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$UpperQuant}.} -\item{CatLimit}{the upper limit for number of ages in a plot using categorical coloring. Plots with more than this number of age greoups will use a gradient coloring scheme. Defaults to 30.} +\item{CatLimit}{the upper limit for number of ages in a plot using categorical coloring. Plots with more than this number of age greoups will use a gradient coloring scheme. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotPosteriorTraces$functionParameterDefaults$CatLimit}.} \item{Legend}{If true legend will be plotted.} } diff --git a/man/PlotSamplingCoverage.Rd b/man/PlotSamplingCoverage.Rd index 5d1ce7e8..a58f7885 100644 --- a/man/PlotSamplingCoverage.Rd +++ b/man/PlotSamplingCoverage.Rd @@ -32,9 +32,9 @@ PlotSamplingCoverage( \item{OtherPercentage}{Controls how many bars are shown. The smallest 'OtherPercentage' \% bars are combined into one bar.} -\item{ColorScheme}{'CellPlot' or 'Gradient'. See details. Defaults to CellPlot.} +\item{ColorScheme}{'CellPlot' or 'Gradient'. See details. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$ColorScheme}.} -\item{Measurement}{The kind of fish measurement that should be used to determine the color of a cell. Defaults to AgeReadings.} +\item{Measurement}{The kind of fish measurement that should be used to determine the color of a cell. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$Measurement}.} \item{UseDefaultColorSettings}{Logical, whether to use default color settings or the values specified in other arguments to this function.} @@ -44,23 +44,23 @@ PlotSamplingCoverage( \item{MinMeasurements}{color scheme "CellPlot". The minimum number of measurements (parameter 'Measurement') for quality "Good", "Few vessels" or "Few catches" coloring of a cell. Defaults to 100.} -\item{ColorNoSamples}{Color to use for cells not sampled. Defaults to #ffffcc.} +\item{ColorNoSamples}{Color to use for cells not sampled. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$ColorNoSamples}.} -\item{ColorFewMeasurements}{Color to use for cells with few measurements. Defaults to #c2e699.} +\item{ColorFewMeasurements}{Color to use for cells with few measurements. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$ColorFewMeasurements}.} -\item{ColorFewCatches}{Color to use for cells with Few Catches. See details. Defaults to #78c679.} +\item{ColorFewCatches}{Color to use for cells with Few Catches. See details. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$ColorFewCatches}.} -\item{ColorFewVessels}{Color to use for cells with Few Vessels See details. Defaults to #31a354.} +\item{ColorFewVessels}{Color to use for cells with Few Vessels See details. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$ColorFewVessels}.} -\item{ColorGoodSampling}{Color to use for cells with Good sampling. See details. Defaults to #006837.} +\item{ColorGoodSampling}{Color to use for cells with Good sampling. See details. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$ColorGoodSampling}.} \item{SamplingUnit}{color scheme "Gradient". The sampling unit used: "Vessels","Catches", or "Measurement"} -\item{GradientLowColor}{Color to use for low end of color gradient. See details. Defaults to #ffffcc.} +\item{GradientLowColor}{Color to use for low end of color gradient. See details. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$GradientLowColor}.} -\item{GradientMidColor}{Color to use for middle of color gradient. See details. Defaults to #c2e699.} +\item{GradientMidColor}{Color to use for middle of color gradient. See details. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$GradientMidColor}.} -\item{GradientHighColor}{Color to use for high end of color gradient. See details. Defaults to #006837.} +\item{GradientHighColor}{Color to use for high end of color gradient. See details. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingCoverage$functionParameterDefaults$GradientHighColor}.} } \value{ \code{\link[RstoxFDA]{PlotSamplingCoverageData}} diff --git a/man/PlotSamplingOverviewCell.Rd b/man/PlotSamplingOverviewCell.Rd index 8c01ecc7..39600dfa 100644 --- a/man/PlotSamplingOverviewCell.Rd +++ b/man/PlotSamplingOverviewCell.Rd @@ -25,25 +25,25 @@ PlotSamplingOverviewCell( \item{ColumnVariable}{The grouping variable in 'ReportFdaSamplingData' that should be used for columns in the cell plot} -\item{Measurement}{The kind of fish measurement that should be used to determine the color of a cell. Defaults to AgeReadings.} +\item{Measurement}{The kind of fish measurement that should be used to determine the color of a cell. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$Measurement}.} \item{UseDefaultColorSettings}{Logical, whether to use default color settings or the value specified for the function parameters MinVessels, MinCatches, MinMeasurements, ColorNoSamples, ColorFewCatches, ColorFewVessels, ColorGoodSampling} -\item{MinVessels}{The minimum number of vessels sampled for a quality "Good" coloring of a cell. Defaults to 2.} +\item{MinVessels}{The minimum number of vessels sampled for a quality "Good" coloring of a cell. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$MinVessels}.} -\item{MinCatches}{The minimum number of catches sampled for quality "Good" or "Few vessels" coloring of a cell. Defaults to 2.} +\item{MinCatches}{The minimum number of catches sampled for quality "Good" or "Few vessels" coloring of a cell. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$MinCatches}.} -\item{MinMeasurements}{The minimum number of measurements (parameter 'Measurement') for quality "Good", "Few vessels" or "Few catches" coloring of a cell. Defaults to 100.} +\item{MinMeasurements}{The minimum number of measurements (parameter 'Measurement') for quality "Good", "Few vessels" or "Few catches" coloring of a cell. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$MinMeasurements}.} -\item{ColorNoSamples}{Color to use for cells not sampled. Defaults to #ffffcc.} +\item{ColorNoSamples}{Color to use for cells not sampled. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$ColorNoSamples}.} -\item{ColorFewMeasurements}{Color to use for cells with few measurements. Defaults to #c2e699.} +\item{ColorFewMeasurements}{Color to use for cells with few measurements. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$ColorFewMeasurements}.} -\item{ColorFewCatches}{Color to use for cells with Few Catches. See details. Defaults to #78c679.} +\item{ColorFewCatches}{Color to use for cells with Few Catches. See details. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$ColorFewCatches}.} -\item{ColorFewVessels}{Color to use for cells with Few Vessels See details. Defaults to #31a354.} +\item{ColorFewVessels}{Color to use for cells with Few Vessels See details. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$ColorFewVessels}.} -\item{ColorGoodSampling}{Color to use for cells with Good sampling. See details. Defaults to #006837.} +\item{ColorGoodSampling}{Color to use for cells with Good sampling. See details. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PlotSamplingOverviewCell$functionParameterDefaults$ColorGoodSampling}.} \item{TextSize}{size of text in cellplot. If not provided, a suitable size will be calculated.} } diff --git a/man/PrepareRecaEstimate.Rd b/man/PrepareRecaEstimate.Rd index bd229933..dd226510 100644 --- a/man/PrepareRecaEstimate.Rd +++ b/man/PrepareRecaEstimate.Rd @@ -55,7 +55,7 @@ mandatory if UseAgingError is TRUE.} \item{StockSplittingParameters}{Parameters for stock splitting. Mandatory if 'UseStockSplitting' is TRUE. May be obtained with \code{\link[RstoxFDA]{DefineStockSplittingParameters}}.} -\item{CellEffect}{Configures the cell effect. Defaults to Off. If 'All', an interaction term will be added with all covariates that in the cell (whether they are fixed or random effects). +\item{CellEffect}{Configures the cell effect. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PrepareRecaEstimate$functionParameterDefaults$CellEffect}. If 'All', an interaction term will be added with all covariates that in the cell (whether they are fixed or random effects). Any CAR-effect is always included in the cell effect.} \item{MinAge}{optional, must match dimensions of any 'AgeErrorMatrix'. @@ -70,7 +70,7 @@ If not provided it will be derived from data.} \item{LengthResolution}{optional, resolution for length measurements in cm. If not provided modal value from data is used.} -\item{HatchDay}{defaults to Defaults to 1. +\item{HatchDay}{defaults to Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$PrepareRecaEstimate$functionParameterDefaults$HatchDay}. encoding the day of the year when fish is consider to transition from one age to the next. 1 represents Jan 1st.} } \value{ diff --git a/man/ReportFdaLandings.Rd b/man/ReportFdaLandings.Rd index a1793be3..32837b98 100644 --- a/man/ReportFdaLandings.Rd +++ b/man/ReportFdaLandings.Rd @@ -17,9 +17,9 @@ and approriate columns added for identifying corresponding samples} \item{GroupingVariables}{Columns of 'StoxBioticData' and 'StoxLandingData' that partitions the fisheries. If not provided, a single row for all landings will be produced.} -\item{Decimals}{integer specifying the number of decimals to report for 'LandedRoundWeight' and 'WeightOfSampledCatches'. Defaults to 0.} +\item{Decimals}{integer specifying the number of decimals to report for 'LandedRoundWeight' and 'WeightOfSampledCatches'. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$ReportFdaLandings$functionParameterDefaults$Decimals}.} -\item{Unit}{unit for the weights 'LandedRoundWeight' and 'WeightOfSampledCatches'. Defaults to kg.} +\item{Unit}{unit for the weights 'LandedRoundWeight' and 'WeightOfSampledCatches'. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$ReportFdaLandings$functionParameterDefaults$Unit}.} } \value{ \code{\link[RstoxFDA]{ReportFdaLandingData}} diff --git a/man/ReportFdaSOP.Rd b/man/ReportFdaSOP.Rd index 077d3a67..0a235f0f 100644 --- a/man/ReportFdaSOP.Rd +++ b/man/ReportFdaSOP.Rd @@ -23,9 +23,9 @@ ReportFdaSOP( \item{GroupingVariables}{Columns of 'StoxLandingData' that partitions the landings into groups SOP tests should be reported for.} -\item{DecimalWeight}{integer specifying the number of decimals to report for weights: 'TotalWeightEstimated', 'LandedWeight', and 'Difference'. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ReportFdaSOP$functionParameterDefaults$DecimalWeight`.} +\item{DecimalWeight}{integer specifying the number of decimals to report for weights: 'TotalWeightEstimated', 'LandedWeight', and 'Difference'. Defaults to `r RstoxFDA::stoxFunctionAttributes$ReportFdaSOP$functionParameterDefaults$DecimalWeight`.} -\item{DecimalFraction}{integer specifying the number of decimals to report for 'RelativeDifference'. Defaults to `r RstoxFDA:::stoxFunctionAttributes$ReportFdaSOP$functionParameterDefaults$DecimalFraction`.} +\item{DecimalFraction}{integer specifying the number of decimals to report for 'RelativeDifference'. Defaults to `r RstoxFDA::stoxFunctionAttributes$ReportFdaSOP$functionParameterDefaults$DecimalFraction`.} \item{UnitFraction}{unit for the RelativeDifference. E.g. '0.' for decimal notation or '\%' for percent.} } diff --git a/man/ReportFdaSampling.Rd b/man/ReportFdaSampling.Rd index 2425964a..4b3f6ef6 100644 --- a/man/ReportFdaSampling.Rd +++ b/man/ReportFdaSampling.Rd @@ -22,9 +22,9 @@ and approriate columns added for identifying corresponding samples} \item{GroupingVariables}{Columns of 'StoxBioticData' and 'StoxLandingData' that partitions the fisheries. If not provided, a single row for all landings will be produced.} -\item{Decimals}{integer specifying the number of decimals to report for 'LandedRoundWeight' and 'WeightOfSampledCatches'. Defaults to 0.} +\item{Decimals}{integer specifying the number of decimals to report for 'LandedRoundWeight' and 'WeightOfSampledCatches'. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$ReportFdaSampling$functionParameterDefaults$Decimals}.} -\item{Unit}{unit for the weights 'LandedRoundWeight' and 'WeightOfSampledCatches'. Defaults to kg} +\item{Unit}{unit for the weights 'LandedRoundWeight' and 'WeightOfSampledCatches'. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$ReportFdaSampling$functionParameterDefaults$Unit}} \item{SamplingVariables}{Columns of 'StoxBioticData' identifying sampling variables to be use to partition the report. See details.} } diff --git a/man/ReportParameterConvergence.Rd b/man/ReportParameterConvergence.Rd index 9809fd3e..b3abfd8a 100644 --- a/man/ReportParameterConvergence.Rd +++ b/man/ReportParameterConvergence.Rd @@ -13,9 +13,9 @@ ReportParameterConvergence( \arguments{ \item{ParameterizationSummaryData}{summary statistics for Reca parameters} -\item{Tolerance}{threshold for reporting parameters. Defaults to 0.1. See details} +\item{Tolerance}{threshold for reporting parameters. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$ReportParameterConvergence$functionParameterDefaults$Tolerance}. See details} -\item{Decimals}{integer specifying the number of decimals to report for 'GelmanRubinR'. Defaults to 2.} +\item{Decimals}{integer specifying the number of decimals to report for 'GelmanRubinR'. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$ReportParameterConvergence$functionParameterDefaults$Decimals}.} } \value{ \code{\link[RstoxFDA]{ParameterConvergenceData}} diff --git a/man/ReportRecaCatchAtAge.Rd b/man/ReportRecaCatchAtAge.Rd index 87c86bb1..fb878560 100644 --- a/man/ReportRecaCatchAtAge.Rd +++ b/man/ReportRecaCatchAtAge.Rd @@ -17,9 +17,9 @@ ReportRecaCatchAtAge( \item{PlusGroup}{If given, ages 'PlusGroup' or older are included in a plus group.} -\item{IntervalWidth}{The width of the reported credible interval. A value of 0.9 gives 90 per cent credible intervals. Defaults to 0.9} +\item{IntervalWidth}{The width of the reported credible interval. A value of 0.9 gives 90 per cent credible intervals. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchAtAge$functionParameterDefaults$IntervalWidth}} -\item{Decimals}{integer specifying the number of decimals to report for 'CatchAtAge', 'SD', 'Low' and 'High'. Defaults to 0.} +\item{Decimals}{integer specifying the number of decimals to report for 'CatchAtAge', 'SD', 'Low' and 'High'. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchAtAge$functionParameterDefaults$Decimals}.} \item{Unit}{unit for 'CatchAtAge', 'SD', 'Low' and 'High'} } diff --git a/man/ReportRecaCatchAtAgeCovariance.Rd b/man/ReportRecaCatchAtAgeCovariance.Rd index 3a7283c7..6936132b 100644 --- a/man/ReportRecaCatchAtAgeCovariance.Rd +++ b/man/ReportRecaCatchAtAgeCovariance.Rd @@ -16,7 +16,7 @@ ReportRecaCatchAtAgeCovariance( \item{PlusGroup}{If given, ages 'PlusGroup' or older are included in a plus group.} -\item{Decimals}{integer specifying the number of decimals to report for 'Covariance'. Defaults to 0.} +\item{Decimals}{integer specifying the number of decimals to report for 'Covariance'. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchAtAgeCovariance$functionParameterDefaults$Decimals}.} \item{Unit}{unit for 'CatchAtAge'. Covariance will be provided as the square of this unit.} } diff --git a/man/ReportRecaCatchAtLength.Rd b/man/ReportRecaCatchAtLength.Rd index 801c844b..b388940c 100644 --- a/man/ReportRecaCatchAtLength.Rd +++ b/man/ReportRecaCatchAtLength.Rd @@ -15,9 +15,9 @@ ReportRecaCatchAtLength( \arguments{ \item{RecaCatchAtAge}{Results from MCMC simulations (\code{\link[RstoxFDA]{RecaCatchAtAge}}).} -\item{IntervalWidth}{The width of the reported credible interval. A value of 0.9 gives 90 per cent credible intervals. Defaults to 0.9.} +\item{IntervalWidth}{The width of the reported credible interval. A value of 0.9 gives 90 per cent credible intervals. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchAtLength$functionParameterDefaults$IntervalWidth}.} -\item{Decimals}{integer specifying the number of decimals to report for 'CatchAtLength', 'SD', 'Low' and 'High'. Defaults to 0.} +\item{Decimals}{integer specifying the number of decimals to report for 'CatchAtLength', 'SD', 'Low' and 'High'. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchAtLength$functionParameterDefaults$Decimals}.} \item{Unit}{unit for 'CatchAtLength', 'SD', 'Low' and 'High'} diff --git a/man/ReportRecaCatchStatistics.Rd b/man/ReportRecaCatchStatistics.Rd index fb5a9070..9fff0a94 100644 --- a/man/ReportRecaCatchStatistics.Rd +++ b/man/ReportRecaCatchStatistics.Rd @@ -24,29 +24,29 @@ ReportRecaCatchStatistics( \arguments{ \item{RecaCatchAtAge}{Results from MCMC simulations (\code{\link[RstoxFDA]{RecaCatchAtAge}}).} -\item{IntervalWidth}{The width of the reported credible interval. A value to 0.9 gives 90 per cent credible intervals. Defaults to 0.9.} +\item{IntervalWidth}{The width of the reported credible interval. A value to 0.9 gives 90 per cent credible intervals. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$IntervalWidth}.} \item{UseDefaultDecimalOptions}{logical determining whether to use default decimal options.} -\item{DecimalTotalNumber}{integer specifying the number of decimals to report for 'TotalNumber', and the corresponding 'SD', 'Low' and 'High'. Defaults to 0.} +\item{DecimalTotalNumber}{integer specifying the number of decimals to report for 'TotalNumber', and the corresponding 'SD', 'Low' and 'High'. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$DecimalTotalNumber}.} -\item{DecimalTotalWeight}{integer specifying the number of decimals to report for 'TotalWeightDefaults', and the corresponding 'SD', 'Low' and 'High'. Defaults to 0.} +\item{DecimalTotalWeight}{integer specifying the number of decimals to report for 'TotalWeightDefaults', and the corresponding 'SD', 'Low' and 'High'. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$DecimalTotalWeight}.} -\item{DecimalMeanAge}{integer specifying the number of decimals to report for 'MeanIndividualAge', and the corresponding 'SD', 'Low' and 'High'. 1.} +\item{DecimalMeanAge}{integer specifying the number of decimals to report for 'MeanIndividualAge', and the corresponding 'SD', 'Low' and 'High'. \verb{r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$DecimalMeanAge}.} -\item{DecimalMeanWeight}{integer specifying the number of decimals to report for 'MeanIndividualWeight', and the corresponding 'SD', 'Low' and 'High'. 3.} +\item{DecimalMeanWeight}{integer specifying the number of decimals to report for 'MeanIndividualWeight', and the corresponding 'SD', 'Low' and 'High'. \verb{r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$DecimalMeanWeight}.} -\item{DecimalMeanLength}{integer specifying the number of decimals to report for 'MeanIndividualLength', and the corresponding 'SD', 'Low' and 'High'.3.} +\item{DecimalMeanLength}{integer specifying the number of decimals to report for 'MeanIndividualLength', and the corresponding 'SD', 'Low' and 'High'.\verb{r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$DecimalMeanLength}.} \item{UseDefaultUnitOptions}{logical determining whether to use default unit options.} -\item{UnitTotalNumber}{unit for total catch in numbers. 10^6 individuals.} +\item{UnitTotalNumber}{unit for total catch in numbers. \verb{r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$UnitTotalNumber}.} -\item{UnitTotalWeight}{unit for weight of total catch. kiloton.} +\item{UnitTotalWeight}{unit for weight of total catch. \verb{r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$UnitTotalWeight}.} -\item{UnitMeanWeight}{unit for mean weight. kg.} +\item{UnitMeanWeight}{unit for mean weight. \verb{r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$UnitMeanWeight}.} -\item{UnitMeanLength}{unit for mean length. cm.} +\item{UnitMeanLength}{unit for mean length. \verb{r RstoxFDA::stoxFunctionAttributes$ReportRecaCatchStatistics$functionParameterDefaults$UnitMeanLength}.} } \value{ \code{\link[RstoxFDA]{ReportFdaSummaryData}} diff --git a/man/RunRecaModels.Rd b/man/RunRecaModels.Rd index 22989c8c..34771ca7 100644 --- a/man/RunRecaModels.Rd +++ b/man/RunRecaModels.Rd @@ -20,11 +20,11 @@ RunRecaModels( \item{GroupingVariables}{character vector identifying columns in 'StoxLandingData' that results should be provided for.} -\item{TemporalResolution}{Code for temporal resolution in landings: "Month" or "Quarter". Defaults to Quarter. +\item{TemporalResolution}{Code for temporal resolution in landings: "Month" or "Quarter". Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$RunRecaModels$functionParameterDefaults$TemporalResolution}. Regulates temporal resolution for calculating fractional ages of fish. Not to be confused with any temporal covariate.} -\item{Caa.burnin}{see documentation for \code{\link[Reca]{eca.predict}}. Defaults to 0.} +\item{Caa.burnin}{see documentation for \code{\link[Reca]{eca.predict}}. Defaults to \verb{r RstoxFDA::stoxFunctionAttributes$RunRecaModels$functionParameterDefaults$Caa.burnin}.} \item{CollapseLength}{indicates whether length groups should be collapsed in result. Defaults to TRUE. See details.} } diff --git a/man/SetShortGearBiotic.Rd b/man/SetShortGearBiotic.Rd index 74e343c0..d9523367 100644 --- a/man/SetShortGearBiotic.Rd +++ b/man/SetShortGearBiotic.Rd @@ -26,7 +26,7 @@ Set the column 'gear' on the table 'fishstation' in \code{\link[RstoxData]{Bioti For bioticdata that does not conform to this, no modifications are done. } \seealso{ -\code{\link{RstoxData}{RstoxData::StoxBiotic}} For converting \code{\link[RstoxData]{BioticData}} to \code{\link[RstoxData]{StoxBioticData}}. +\code{\link[RstoxData]{StoxBiotic}} For converting \code{\link[RstoxData]{BioticData}} to \code{\link[RstoxData]{StoxBioticData}}. } \concept{StoX-functions} \concept{gear coding functions} diff --git a/vignettes/StoX-data-preparation.Rmd b/vignettes/StoX-data-preparation.Rmd index f5d9aadc..55dc63dc 100644 --- a/vignettes/StoX-data-preparation.Rmd +++ b/vignettes/StoX-data-preparation.Rmd @@ -43,7 +43,7 @@ As StoX is composed of several R-packages. Functions will be referred to by thei ## Obtaining data While this vignette introduces some tools to assist correct usage of FDA-data, no attempt is made at introducing unfamiliar users to the peculiarities of fisheries dependent sampling. For IMR samples a provisional guide to FDA-data (in Norwegian) can be found at the [IMR intranet: Kilder fiskeriavhengige data](https://havforskningsinstituttet.sharepoint.com/sites/Fiskeridynamikk/Delte%20dokumenter/Forms/AllItems.aspx?id=%2Fsites%2FFiskeridynamikk%2FDelte%20dokumenter%2FKilder%20%E2%80%93%20fiskeriavhengige%20data%2Epdf&parent=%2Fsites%2FFiskeridynamikk%2FDelte%20dokumenter), and for census data some introduction (in Norwegian) can be found at the [IMR intranet: Fiskeridata](https://havforskningsinstituttet.sharepoint.com/sites/Forskningsdata/SitePages/Fiskeridata.aspx) -Within the IMR-computer-network both landing data and sample data can be obtained from the [dataset explorer](https://datasetexplorer.hi.no/apps/datasetexplorer/v2/navigation). Consider using the tools-menu to download landing data and to compile sample data, if the pre-compiled data sets under 'commercial sampling' are not suitable. Otherwise landing data is available in various formats as described at the [IMR intranet: Fiskeridata](https://havforskningsinstituttet.sharepoint.com/sites/Forskningsdata/SitePages/Fiskeridata.aspx), and some data is publicly available directly from [FDIR](https://www.fiskeridir.no/Tall-og-analyse/AApne-data) (also in Norwegian). +Within the IMR-computer-network both landing data and sample data can be obtained from the Dataset Explorer. Consider using the tools-menu to download landing data and to compile sample data, if the pre-compiled data sets under 'commercial sampling' are not suitable. Otherwise landing data is available in various formats as described at the [IMR intranet: Fiskeridata](https://havforskningsinstituttet.sharepoint.com/sites/Forskningsdata/SitePages/Fiskeridata.aspx), and some data is publicly available directly from [FDIR](https://www.fiskeridir.no/Tall-og-analyse/AApne-data) (also in Norwegian). ## Installation RstoxFDA is an optional package in StoX. In order to use the functions introduced in this vignette in the StoX user interface, make sure RstoxFDA is installed. See installation instructions on [github: StoXProject/RstoxFDA](https://github.com/StoXProject/RstoxFDA). To install the StoX user interface, see instructions on [github: StoXProject/StoX](https://github.com/StoXProject/StoX)