From cd8000eaf6cc7f204f2d3a3d878c76b5a122bcc1 Mon Sep 17 00:00:00 2001 From: Ernesto Jardim Date: Wed, 23 Oct 2024 17:50:45 +0200 Subject: [PATCH] new roxizenised man pages --- .Rbuildignore | 1 + DESCRIPTION | 2 +- NEWS.md | 20 +++++++++++++++++ README.Rmd | 55 +++++++++++++++++++++++++++++++++++++++++++++ README.md | 4 ++-- man/multisca.Rd | 42 ++++++++++++++++++++++++++++++++++ man/plot-methods.Rd | 4 +++- 7 files changed, 124 insertions(+), 4 deletions(-) create mode 100644 README.Rmd create mode 100644 man/multisca.Rd diff --git a/.Rbuildignore b/.Rbuildignore index a563338..76bb9f7 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -12,3 +12,4 @@ tests/wcsam.R ^.*\.Rproj$ ^\.Rproj\.user$ docs/ +^README\.Rmd$ diff --git a/DESCRIPTION b/DESCRIPTION index e835ab5..610101d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -67,5 +67,5 @@ Collate: 'southern_hake-data.R' 'a4amse-sa.R' 'a4aFitCatchDiagn-class.R' -RoxygenNote: 7.2.1 +RoxygenNote: 7.3.2 Encoding: UTF-8 diff --git a/NEWS.md b/NEWS.md index cda28ee..44ce77d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,23 @@ +# FLa4a 1.9.x: + +## NEW FEATURES +- plot for residuals by age +- multisca method to run several sca + +## BUG FIXES: +- sca use of covariates fixed + +# FLa4a 1.8.x: + +## NEW FEATURES +- pearson and raw residuals +- method replaceZeros for stock and index objects +- mse sca now replaces zeros before calling fit + +## BUG FIXES: +- problem dealing with iters that don't converged fixed. Related with 'active'. +- sca.sa fixed to be compatible with mse 2.0 + # FLa4a 1.6.5: ## NEW FEATURES diff --git a/README.Rmd b/README.Rmd new file mode 100644 index 0000000..eeca772 --- /dev/null +++ b/README.Rmd @@ -0,0 +1,55 @@ +--- +output: github_document +--- + + + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>", + fig.path = "man/figures/README-", + out.width = "100%" +) +``` + +# FLa4a + + + + +The goal of FLa4a is to ... + +## Installation + +You can install the development version of FLa4a from [GitHub](https://github.com/) with: + +``` r +# install.packages("pak") +pak::pak("flr/FLa4a") +``` + +## Example + +This is a basic example which shows you how to solve a common problem: + +```{r example} +library(FLa4a) +## basic example code +``` + +What is special about using `README.Rmd` instead of just `README.md`? You can include R chunks like so: + +```{r cars} +summary(cars) +``` + +You'll still need to render `README.Rmd` regularly, to keep `README.md` up-to-date. `devtools::build_readme()` is handy for this. + +You can also embed plots, for example: + +```{r pressure, echo = FALSE} +plot(pressure) +``` + +In that case, don't forget to commit and push the resulting figure files, so they display on GitHub and CRAN. diff --git a/README.md b/README.md index e4e5df5..29c4ba5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # FLa4a -- Version: 1.8.3 +- Version: 1.9.0 - Author: Colin P. Millar and Ernesto Jardim -- Maintainer: Ernesto Jardim +- Maintainer: Colin P. Millar - Repository: - Bug reports: diff --git a/man/multisca.Rd b/man/multisca.Rd new file mode 100644 index 0000000..ad3e02a --- /dev/null +++ b/man/multisca.Rd @@ -0,0 +1,42 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/fittingFunctions.R +\docType{methods} +\name{multisca} +\alias{multisca} +\title{Run several stock assessments in a single run} +\usage{ +multisca( + stocks, + indicess, + fmodel = missing, + qmodel = missing, + srmodel = missing, + n1model = missing, + vmodel = missing, + combination.all = FALSE, + ... +) +} +\arguments{ +\item{fmodel}{a list of \code{fmodel} objects, each with a formula object depicting the model for log fishing mortality at age} + +\item{qmodel}{a list of \code{qmodel} objects, each with a list of formula objects depicting the models for log survey catchability at age} + +\item{srmodel}{a list of \code{srmodel} objects, each with a formula object depicting the model for log recruitment} + +\item{n1model}{a list of \code{n1model} objects, each with a formula object depicting the model for the first year of catch data} + +\item{vmodel}{a list of \code{vmodel} objects, each with a list of formula objects depicting the models for log survey and log fishing mortality variance} + +\item{combination.all}{bolean parameter (default is FALSE) to define if a full factorial across all stocks, indices, and submodel is run or just a sequence of runs.} + +\item{...}{all other arguments to be passed to \code{sca}} + +\item{stock}{an \code{FLStocks} object, each component with a \ciode{FLStock} object containing catch and stock information} +} +\value{ +an \code{a4aFits} or \code{a4aFitSAs} or \code{a4aFitMCMCs} depending on the argument \code{fit} +} +\description{ +Internal method to run several stock assessment fits with different stocks, indices and submodels +} diff --git a/man/plot-methods.Rd b/man/plot-methods.Rd index 951acd1..4f39969 100644 --- a/man/plot-methods.Rd +++ b/man/plot-methods.Rd @@ -7,7 +7,7 @@ \alias{plot,a4aFitResiduals,missing-method} \title{Plot of standardized log residuals} \usage{ -\S4method{plot}{a4aFitResiduals,missing}(x, y = missing, auxline = "smooth", ...) +\S4method{plot}{a4aFitResiduals,missing}(x, y = missing, auxline = "smooth", by = "year", ...) \S4method{plot}{a4aFitCatchDiagn,missing}(x, y = missing, ...) } @@ -18,6 +18,8 @@ \item{auxline}{a string defining the type of line to be added, by default uses 'smooth', a common alternative is to use 'r', a regression, or leave it empty ''} +\item{by}{a string defining the type of plot to be depicted. At the moment accepts only 'age', the default, or 'year'.} + \item{...}{additional argument list that might never be used} } \value{