From 6f71243e65701a38ec26c615ad07ecdd541e2e86 Mon Sep 17 00:00:00 2001 From: jimianelli Date: Tue, 6 Aug 2024 19:52:53 +0000 Subject: [PATCH] Docs: run devtools::document() --- man/dat2list.Rd | 12 ++++++------ man/plotSPM.Rd | 26 ++++++++++++++++---------- man/plotSPMx.Rd | 24 ++++++++++++++++++++++++ man/print_Tier3_tables.Rd | 25 ------------------------- 4 files changed, 46 insertions(+), 41 deletions(-) create mode 100644 man/plotSPMx.Rd delete mode 100644 man/print_Tier3_tables.Rd diff --git a/man/dat2list.Rd b/man/dat2list.Rd index c89d655..10a77b1 100644 --- a/man/dat2list.Rd +++ b/man/dat2list.Rd @@ -2,21 +2,21 @@ % Please edit documentation in R/readData.R \name{dat2list} \alias{dat2list} -\title{Read Data File into List Object} +\title{Convert Data to List} \usage{ dat2list(fn) } \arguments{ -\item{fn}{Filename of the data file to be read.} +\item{fn}{A character string representing the file name to be read.} } \value{ -A list object containing the data from the file. +A list with numeric data or character strings based on the content of the file. } \description{ -Reads a data file formatted for a projection model and converts it into a list object. -The function handles numeric and NA values appropriately. +This function reads data from a file and converts it into a list. +If the data are numeric, it maintains the numeric list. If the data are strings, it returns a character string. } \examples{ # Example usage: -# myDataList <- dat2list("datafile.dat") +# result <- dat2list("datafile.txt") } diff --git a/man/plotSPM.Rd b/man/plotSPM.Rd index 1754c13..148f776 100644 --- a/man/plotSPM.Rd +++ b/man/plotSPM.Rd @@ -2,23 +2,29 @@ % Please edit documentation in R/plot-res.R \name{plotSPM} \alias{plotSPM} -\title{Plot Results from SPM Analysis from a Tibble} +\title{Plot SPM Data} \usage{ -plotSPM(df, alt = 2, thisyr = 2022, mytitle = NULL) +plotSPM(df, alt = c(1, 3, 5, 7), mytitle = NULL) } \arguments{ -\item{df}{A tibble containing the results from `spm_detail.csv`.} +\item{df}{A dataframe containing the SPM data with columns `Year`, `Alt`, `variable`, and `value`.} -\item{alt}{The alternative to be plotted.} +\item{alt}{A vector of alternatives to include in the plot. Default is `c(1, 4, 5, 7)`.} -\item{thisyr}{The current year for the projection model.} - -\item{mytitle}{Title for the plot} +\item{mytitle}{An optional title for the plot. Default is `NULL`.} } \value{ -A combined plot of the results from the SPM analysis. +A ggplot object. } \description{ -This function creates plots from the results of a Stock Production Model (SPM) analysis contained in a tibble. -It generates three separate plots for different metrics and combines them using the `patchwork` package. +This function filters and processes a dataframe, then creates a plot +of the SPM data with error bands and faceting by type and alternative. +} +\examples{ +# Example usage: +df <- data.frame(Year = rep(2000:2020, 4), + Alt = rep(1:4, each = 21), + variable = rep(c("mean_ub", "mean_lb", "mean_mean"), times = 28), + value = runif(84, 0, 1)) +plotSPM(df) } diff --git a/man/plotSPMx.Rd b/man/plotSPMx.Rd new file mode 100644 index 0000000..9ac0224 --- /dev/null +++ b/man/plotSPMx.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plot-res.R +\name{plotSPMx} +\alias{plotSPMx} +\title{Plot Results from SPM Analysis from a Tibble} +\usage{ +plotSPMx(df, alt = 2, thisyr = 2022, mytitle = NULL) +} +\arguments{ +\item{df}{A tibble containing the results from `spm_detail.csv`.} + +\item{alt}{The alternative to be plotted.} + +\item{thisyr}{The current year for the projection model.} + +\item{mytitle}{Title for the plot} +} +\value{ +A combined plot of the results from the SPM analysis. +} +\description{ +This function creates plots from the results of a Stock Production Model (SPM) analysis contained in a tibble. +It generates three separate plots for different metrics and combines them using the `patchwork` package. +} diff --git a/man/print_Tier3_tables.Rd b/man/print_Tier3_tables.Rd deleted file mode 100644 index 510aa55..0000000 --- a/man/print_Tier3_tables.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/readData.R -\name{print_Tier3_tables} -\alias{print_Tier3_tables} -\title{Print Tier 3 Tables} -\usage{ -print_Tier3_tables(df, modname = "base", stock = "BSAI Atka mackerel") -} -\arguments{ -\item{df}{Data frame containing Tier 3 data.} - -\item{modname}{Name of the model used, defaults to "base".} - -\item{stock}{Name of the stock, defaults to "BSAI Atka mackerel".} -} -\value{ -HTML tables for the specified Tier 3 data. -} -\description{ -Generates and prints HTML tables for Tier 3 projections including catch, ABC, fishing mortality, and spawning biomass for various scenarios. -} -\examples{ -# Example usage: -# print_Tier3_tables(myDataFrame, "model1", "Some Fish Stock") -}