From 49458300bd858942b96e5ee91f8c1d4c242a0b5c Mon Sep 17 00:00:00 2001 From: MOshima-PIFSC Date: Tue, 10 Dec 2024 16:39:34 -1000 Subject: [PATCH] doc(FIMSFrame): Adds documentation to accessors Many of the accessors were not documented, also increases the consistency of the documentation. Also fixes fleet subsetting to allow for multiple fleets rather than using ==, where it now uses %in% Part of #662 --- R/fimsframe.R | 145 +++++++++++++++++++++++------ inst/WORDLIST | 2 + man/ages.Rd | 23 +++++ man/end_year.Rd | 23 +++++ man/fleets.Rd | 24 +++++ man/get_data.Rd | 25 +++++ man/get_lengths.Rd | 23 +++++ man/m_age_to_length_conversion.Rd | 6 +- man/m_agecomp-FIMSFrame-method.Rd | 16 ---- man/m_agecomp.Rd | 14 ++- man/m_index-FIMSFrame-method.Rd | 16 ---- man/m_index.Rd | 14 ++- man/m_landings-FIMSFrame-method.Rd | 14 --- man/m_landings.Rd | 10 +- man/m_lengthcomp.Rd | 2 +- man/m_weight_at_age.Rd | 7 +- man/n_ages.Rd | 23 +++++ man/n_lengths.Rd | 23 +++++ man/n_years.Rd | 23 +++++ man/start_year.Rd | 23 +++++ man/weight_at_age.Rd | 23 +++++ 21 files changed, 396 insertions(+), 83 deletions(-) create mode 100644 man/ages.Rd create mode 100644 man/end_year.Rd create mode 100644 man/fleets.Rd create mode 100644 man/get_data.Rd create mode 100644 man/get_lengths.Rd delete mode 100644 man/m_agecomp-FIMSFrame-method.Rd delete mode 100644 man/m_index-FIMSFrame-method.Rd delete mode 100644 man/m_landings-FIMSFrame-method.Rd create mode 100644 man/n_ages.Rd create mode 100644 man/n_lengths.Rd create mode 100644 man/n_years.Rd create mode 100644 man/start_year.Rd create mode 100644 man/weight_at_age.Rd diff --git a/R/fimsframe.R b/R/fimsframe.R index 741e21c89..7f18a2b5a 100644 --- a/R/fimsframe.R +++ b/R/fimsframe.R @@ -41,81 +41,161 @@ setClass( # is it problematic to set the generic for data? not sure... # but it will not work without set generic # can't call this data because there is already a generic + +#' Get the data to be used in the model +#' +#' @param x An object returned from [FIMSFrame()]. +#' @return +#' A data frame of the class of `data.frame` containing data for a FIMS model +#' in a long format. The data frame will have the following columns: +#' `r glue::glue_collapse(colnames(data_mile1), sep = ", ", last = ", and ")`. +#' @rdname get_data setGeneric("get_data", function(x) standardGeneric("get_data")) +#' @rdname get_data setMethod("get_data", "FIMSFrame", function(x) x@data) +#' @rdname get_data setMethod( "get_data", "data.frame", function(x) FIMSFrame(x)@data ) -# example: so we can call fleets(obj) instead of obj@fleets +# TODO: remove or change this function to return fleet names +#' Get a numeric vector of which fleets are fishing fleets +#' +#' @inheritParams get_data +#' @return +#' A vector of integer values specifying which fleets in the model are fishing +#' fleets. +#' @rdname fleets setGeneric("fleets", function(x) standardGeneric("fleets")) +#' @rdname fleets setMethod("fleets", "FIMSFrame", function(x) x@fleets) +#' @rdname fleets setMethod( "fleets", "data.frame", function(x) FIMSFrame(x)@fleets ) +#' Get the number of years to be used in the model +#' +#' @inheritParams get_data +#' @return +#' A single integer. +#' @rdname n_years setGeneric("n_years", function(x) standardGeneric("n_years")) +#' @rdname n_years setMethod("n_years", "FIMSFrame", function(x) x@n_years) +#' @rdname n_years setMethod( "n_years", "data.frame", function(x) FIMSFrame(x)@n_years ) +#' Get the first year used in the model +#' +#' @inheritParams get_data +#' @inherit n_years return +#' @rdname start_year setGeneric("start_year", function(x) standardGeneric("start_year")) +#' @rdname start_year setMethod("start_year", "FIMSFrame", function(x) x@start_year) +#' @rdname start_year setMethod( "start_year", "data.frame", function(x) FIMSFrame(x)@start_year ) +#' Get the last year used in the model +#' +#' @inheritParams get_data +#' @inherit n_years return +#' @rdname end_year setGeneric("end_year", function(x) standardGeneric("end_year")) +#' @rdname end_year setMethod("end_year", "FIMSFrame", function(x) x@end_year) +#' @rdname end_year setMethod( "end_year", "data.frame", function(x) FIMSFrame(x)@end_year ) +#' Get the age bins used in the model +#' +#' @inheritParams get_data +#' @return +#' A vector of the ages in the model. +#' @rdname ages setGeneric("ages", function(x) standardGeneric("ages")) +#' @rdname ages setMethod("ages", "FIMSFrame", function(x) x@ages) +#' @rdname ages setMethod( "ages", "data.frame", function(x) FIMSFrame(x)@ages ) +#' Get the number of ages used in the model +#' +#' @inheritParams get_data +#' @inherit n_years return +#' @rdname n_ages setGeneric("n_ages", function(x) standardGeneric("n_ages")) +#' @rdname n_ages setMethod("n_ages", "FIMSFrame", function(x) x@n_ages) +#' @rdname n_ages setMethod( "n_ages", "data.frame", function(x) FIMSFrame(x)@n_ages ) +#' Get the length bins used in the model +#' +#' @inheritParams get_data +#' @return +#' A vector of the lengths in the model. +#' @rdname get_lengths setGeneric("get_lengths", function(x) standardGeneric("get_lengths")) +#' @rdname get_lengths setMethod("get_lengths", "FIMSFrame", function(x) x@lengths) +#' @rdname get_lengths setMethod( "get_lengths", "data.frame", function(x) FIMSFrame(x)@lengths ) +#' Get the number of lengths used in the model +#' +#' @inheritParams get_data +#' @inherit n_years return +#' @rdname n_lengths setGeneric("n_lengths", function(x) standardGeneric("n_lengths")) +#' @rdname n_lengths setMethod("n_lengths", "FIMSFrame", function(x) x@n_lengths) +#' @rdname n_lengths setMethod( "n_lengths", "data.frame", function(x) FIMSFrame(x)@n_lengths ) +#' Get the weight at age data used in the model +#' +#' @inheritParams get_data +#' @return +#' A dataframe of weight at age data used in the model. +#' @rdname weight_at_age setGeneric("weight_at_age", function(x) standardGeneric("weight_at_age")) +#' @rdname weight_at_age setMethod("weight_at_age", "FIMSFrame", function(x) x@weight_at_age) +#' @rdname weight_at_age setMethod( "weight_at_age", "data.frame", @@ -128,7 +208,11 @@ setMethod( #' Get the weight at age data to be used in the model #' -#' @param x The object containing weight at age data. +#' @inheritParams get_data +#' @return +#' A vector of weight at age data. The order of the vector is the order +#' the data frame was in before this function was called because it is just +#' extracting a column. #' @export #' @rdname m_weight_at_age setGeneric("m_weight_at_age", function(x) standardGeneric("m_weight_at_age")) @@ -155,14 +239,16 @@ setMethod("m_ages", "FIMSFrame", function(x) { #' Get the landings data to be used in the model #' -#' @param x The object containing landings. +#' @inheritParams get_data +#' @return +#' A vector of landings data. The order of the vector is the order +#' the data frame was in before this function was called because it is just +#' extracting a column. #' @export +#' @rdname m_landings setGeneric("m_landings", function(x) standardGeneric("m_landings")) - -#' Get the landings data to be used in the model -#' -#' @param x The FIMSFrame object containing landings. #' @export +#' @rdname m_landings setMethod( "m_landings", "FIMSFrame", function(x) { @@ -176,23 +262,26 @@ setMethod( #' Get the index data to be used in the model #' -#' @param x The object containing index. -#' @param fleet_name The name of the fleet for the index data. +#' @inheritParams get_data +#' @param fleet_name A string providing the name of the fleet for which you +#' want the index data. Technically, you can pass it a +#' vector of strings but it is more common to pass it a single string. +#' @return +#' A vector of index data. The order of the vector is the order +#' the data frame was in before this function was called because it is just +#' extracting a column. #' @export +#' @rdname m_index setGeneric("m_index", function(x, fleet_name) standardGeneric("m_index")) - -#' Get the index data to be used in the model -#' -#' @param x The FIMSFrame object containing index. -#' @param fleet_name The name of the fleet for the index data. #' @export +#' @rdname m_index setMethod( "m_index", "FIMSFrame", function(x, fleet_name) { dplyr::filter( .data = x@data, .data[["type"]] == "index", - .data[["name"]] == fleet_name + .data[["name"]] %in% fleet_name ) |> dplyr::pull(.data[["value"]]) } @@ -201,24 +290,26 @@ setMethod( #' Get the age-composition data to be used in the model #' -#' @param x The object containing the age-composition data. -#' @param fleet_name The name of the fleet for the age-composition data. +#' @inheritParams get_data +#' @param fleet_name A string providing the name of the fleet for which you +#' want the age-composition data. Technically, you can pass it a +#' vector of strings but it is more common to pass it a single string. +#' @return +#' A vector of age-composition data. The order of the vector is the order +#' the data frame was in before this function was called because it is just +#' extracting a column. #' @export +#' @rdname m_agecomp setGeneric("m_agecomp", function(x, fleet_name) standardGeneric("m_agecomp")) -# Should we add name as an argument here? - -#' Get the age-composition data data to be used in the model -#' -#' @param x The FIMSFrame containing age-composition data. -#' @param fleet_name The name of the fleet for the age-composition data. #' @export +#' @rdname m_agecomp setMethod( "m_agecomp", "FIMSFrame", function(x, fleet_name) { dplyr::filter( .data = x@data, .data[["type"]] == "age", - .data[["name"]] == fleet_name + .data[["name"]] %in% fleet_name ) |> dplyr::pull(.data[["value"]]) } @@ -226,7 +317,7 @@ setMethod( #' Get the length-composition data from a FIMSFrame object #' -#' @param x A FIMSFrame object with length-composition data. +#' @inheritParams get_data #' @param fleet_name A string providing the name of the fleet for which you #' want the length-composition data for. Technically, you can pass it a #' vector of strings but it is more common to pass it a single string. @@ -257,8 +348,8 @@ setMethod( #' Get the age-to-length-conversion data from a FIMSFrame object #' -#' @param x A FIMSFrame object with age-to-length-conversion data (i.e., -#' the proportion of age "a" that are length "l"). +#' If `x` has age-to-length-conversion data (i.e., the proportion of age "a" +#' that are length "l"), then this data will be returned. #' @inheritParams m_lengthcomp #' @return #' A vector of age-to-length-conversion data. The order of the vector is the diff --git a/inst/WORDLIST b/inst/WORDLIST index d1046f24e..3f7d75c96 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -22,6 +22,8 @@ cummax cumprod cumsum cyclomatic +dateend +datestart digamma doxygen eg diff --git a/man/ages.Rd b/man/ages.Rd new file mode 100644 index 000000000..f41b9ce34 --- /dev/null +++ b/man/ages.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/fimsframe.R +\name{ages} +\alias{ages} +\alias{ages,FIMSFrame-method} +\alias{ages,data.frame-method} +\title{Get the age bins used in the model} +\usage{ +ages(x) + +\S4method{ages}{FIMSFrame}(x) + +\S4method{ages}{data.frame}(x) +} +\arguments{ +\item{x}{An object returned from \code{\link[=FIMSFrame]{FIMSFrame()}}.} +} +\value{ +A vector of the ages in the model. +} +\description{ +Get the age bins used in the model +} diff --git a/man/end_year.Rd b/man/end_year.Rd new file mode 100644 index 000000000..641e80d07 --- /dev/null +++ b/man/end_year.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/fimsframe.R +\name{end_year} +\alias{end_year} +\alias{end_year,FIMSFrame-method} +\alias{end_year,data.frame-method} +\title{Get the last year used in the model} +\usage{ +end_year(x) + +\S4method{end_year}{FIMSFrame}(x) + +\S4method{end_year}{data.frame}(x) +} +\arguments{ +\item{x}{An object returned from \code{\link[=FIMSFrame]{FIMSFrame()}}.} +} +\value{ +A single integer. +} +\description{ +Get the last year used in the model +} diff --git a/man/fleets.Rd b/man/fleets.Rd new file mode 100644 index 000000000..de494f0b2 --- /dev/null +++ b/man/fleets.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/fimsframe.R +\name{fleets} +\alias{fleets} +\alias{fleets,FIMSFrame-method} +\alias{fleets,data.frame-method} +\title{Get a numeric vector of which fleets are fishing fleets} +\usage{ +fleets(x) + +\S4method{fleets}{FIMSFrame}(x) + +\S4method{fleets}{data.frame}(x) +} +\arguments{ +\item{x}{An object returned from \code{\link[=FIMSFrame]{FIMSFrame()}}.} +} +\value{ +A vector of integer values specifying which fleets in the model are fishing +fleets. +} +\description{ +Get a numeric vector of which fleets are fishing fleets +} diff --git a/man/get_data.Rd b/man/get_data.Rd new file mode 100644 index 000000000..978e68909 --- /dev/null +++ b/man/get_data.Rd @@ -0,0 +1,25 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/fimsframe.R +\name{get_data} +\alias{get_data} +\alias{get_data,FIMSFrame-method} +\alias{get_data,data.frame-method} +\title{Get the data to be used in the model} +\usage{ +get_data(x) + +\S4method{get_data}{FIMSFrame}(x) + +\S4method{get_data}{data.frame}(x) +} +\arguments{ +\item{x}{An object returned from \code{\link[=FIMSFrame]{FIMSFrame()}}.} +} +\value{ +A data frame of the class of \code{data.frame} containing data for a FIMS model +in a long format. The data frame will have the following columns: +type, name, age, datestart, dateend, value, unit, and uncertainty. +} +\description{ +Get the data to be used in the model +} diff --git a/man/get_lengths.Rd b/man/get_lengths.Rd new file mode 100644 index 000000000..c2f4b4c40 --- /dev/null +++ b/man/get_lengths.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/fimsframe.R +\name{get_lengths} +\alias{get_lengths} +\alias{get_lengths,FIMSFrame-method} +\alias{get_lengths,data.frame-method} +\title{Get the length bins used in the model} +\usage{ +get_lengths(x) + +\S4method{get_lengths}{FIMSFrame}(x) + +\S4method{get_lengths}{data.frame}(x) +} +\arguments{ +\item{x}{An object returned from \code{\link[=FIMSFrame]{FIMSFrame()}}.} +} +\value{ +A vector of the lengths in the model. +} +\description{ +Get the length bins used in the model +} diff --git a/man/m_age_to_length_conversion.Rd b/man/m_age_to_length_conversion.Rd index 916e6df2b..4012e039b 100644 --- a/man/m_age_to_length_conversion.Rd +++ b/man/m_age_to_length_conversion.Rd @@ -10,8 +10,7 @@ m_age_to_length_conversion(x, fleet_name) \S4method{m_age_to_length_conversion}{FIMSFrame}(x, fleet_name) } \arguments{ -\item{x}{A FIMSFrame object with age-to-length-conversion data (i.e., -the proportion of age "a" that are length "l").} +\item{x}{An object returned from \code{\link[=FIMSFrame]{FIMSFrame()}}.} \item{fleet_name}{A string providing the name of the fleet for which you want the length-composition data for. Technically, you can pass it a @@ -23,5 +22,6 @@ order the data frame was in before this function was called because it is just extracting a column. } \description{ -Get the age-to-length-conversion data from a FIMSFrame object +If \code{x} has age-to-length-conversion data (i.e., the proportion of age "a" +that are length "l"), then this data will be returned. } diff --git a/man/m_agecomp-FIMSFrame-method.Rd b/man/m_agecomp-FIMSFrame-method.Rd deleted file mode 100644 index f678b0f01..000000000 --- a/man/m_agecomp-FIMSFrame-method.Rd +++ /dev/null @@ -1,16 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/fimsframe.R -\name{m_agecomp,FIMSFrame-method} -\alias{m_agecomp,FIMSFrame-method} -\title{Get the age-composition data data to be used in the model} -\usage{ -\S4method{m_agecomp}{FIMSFrame}(x, fleet_name) -} -\arguments{ -\item{x}{The FIMSFrame containing age-composition data.} - -\item{fleet_name}{The name of the fleet for the age-composition data.} -} -\description{ -Get the age-composition data data to be used in the model -} diff --git a/man/m_agecomp.Rd b/man/m_agecomp.Rd index 9b3224c0f..a6712171a 100644 --- a/man/m_agecomp.Rd +++ b/man/m_agecomp.Rd @@ -2,14 +2,24 @@ % Please edit documentation in R/fimsframe.R \name{m_agecomp} \alias{m_agecomp} +\alias{m_agecomp,FIMSFrame-method} \title{Get the age-composition data to be used in the model} \usage{ m_agecomp(x, fleet_name) + +\S4method{m_agecomp}{FIMSFrame}(x, fleet_name) } \arguments{ -\item{x}{The object containing the age-composition data.} +\item{x}{An object returned from \code{\link[=FIMSFrame]{FIMSFrame()}}.} -\item{fleet_name}{The name of the fleet for the age-composition data.} +\item{fleet_name}{A string providing the name of the fleet for which you +want the age-composition data. Technically, you can pass it a +vector of strings but it is more common to pass it a single string.} +} +\value{ +A vector of age-composition data. The order of the vector is the order +the data frame was in before this function was called because it is just +extracting a column. } \description{ Get the age-composition data to be used in the model diff --git a/man/m_index-FIMSFrame-method.Rd b/man/m_index-FIMSFrame-method.Rd deleted file mode 100644 index f40b1323f..000000000 --- a/man/m_index-FIMSFrame-method.Rd +++ /dev/null @@ -1,16 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/fimsframe.R -\name{m_index,FIMSFrame-method} -\alias{m_index,FIMSFrame-method} -\title{Get the index data to be used in the model} -\usage{ -\S4method{m_index}{FIMSFrame}(x, fleet_name) -} -\arguments{ -\item{x}{The FIMSFrame object containing index.} - -\item{fleet_name}{The name of the fleet for the index data.} -} -\description{ -Get the index data to be used in the model -} diff --git a/man/m_index.Rd b/man/m_index.Rd index de027322c..812ccf429 100644 --- a/man/m_index.Rd +++ b/man/m_index.Rd @@ -2,14 +2,24 @@ % Please edit documentation in R/fimsframe.R \name{m_index} \alias{m_index} +\alias{m_index,FIMSFrame-method} \title{Get the index data to be used in the model} \usage{ m_index(x, fleet_name) + +\S4method{m_index}{FIMSFrame}(x, fleet_name) } \arguments{ -\item{x}{The object containing index.} +\item{x}{An object returned from \code{\link[=FIMSFrame]{FIMSFrame()}}.} -\item{fleet_name}{The name of the fleet for the index data.} +\item{fleet_name}{A string providing the name of the fleet for which you +want the index data. Technically, you can pass it a +vector of strings but it is more common to pass it a single string.} +} +\value{ +A vector of index data. The order of the vector is the order +the data frame was in before this function was called because it is just +extracting a column. } \description{ Get the index data to be used in the model diff --git a/man/m_landings-FIMSFrame-method.Rd b/man/m_landings-FIMSFrame-method.Rd deleted file mode 100644 index 1eabcb134..000000000 --- a/man/m_landings-FIMSFrame-method.Rd +++ /dev/null @@ -1,14 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/fimsframe.R -\name{m_landings,FIMSFrame-method} -\alias{m_landings,FIMSFrame-method} -\title{Get the landings data to be used in the model} -\usage{ -\S4method{m_landings}{FIMSFrame}(x) -} -\arguments{ -\item{x}{The FIMSFrame object containing landings.} -} -\description{ -Get the landings data to be used in the model -} diff --git a/man/m_landings.Rd b/man/m_landings.Rd index 7788df664..74fe8416b 100644 --- a/man/m_landings.Rd +++ b/man/m_landings.Rd @@ -2,12 +2,20 @@ % Please edit documentation in R/fimsframe.R \name{m_landings} \alias{m_landings} +\alias{m_landings,FIMSFrame-method} \title{Get the landings data to be used in the model} \usage{ m_landings(x) + +\S4method{m_landings}{FIMSFrame}(x) } \arguments{ -\item{x}{The object containing landings.} +\item{x}{An object returned from \code{\link[=FIMSFrame]{FIMSFrame()}}.} +} +\value{ +A vector of landings data. The order of the vector is the order +the data frame was in before this function was called because it is just +extracting a column. } \description{ Get the landings data to be used in the model diff --git a/man/m_lengthcomp.Rd b/man/m_lengthcomp.Rd index f88cd9051..976d135f8 100644 --- a/man/m_lengthcomp.Rd +++ b/man/m_lengthcomp.Rd @@ -10,7 +10,7 @@ m_lengthcomp(x, fleet_name) \S4method{m_lengthcomp}{FIMSFrame}(x, fleet_name) } \arguments{ -\item{x}{A FIMSFrame object with length-composition data.} +\item{x}{An object returned from \code{\link[=FIMSFrame]{FIMSFrame()}}.} \item{fleet_name}{A string providing the name of the fleet for which you want the length-composition data for. Technically, you can pass it a diff --git a/man/m_weight_at_age.Rd b/man/m_weight_at_age.Rd index 8abdf96b6..59113e57b 100644 --- a/man/m_weight_at_age.Rd +++ b/man/m_weight_at_age.Rd @@ -10,7 +10,12 @@ m_weight_at_age(x) \S4method{m_weight_at_age}{FIMSFrame}(x) } \arguments{ -\item{x}{The object containing weight at age data.} +\item{x}{An object returned from \code{\link[=FIMSFrame]{FIMSFrame()}}.} +} +\value{ +A vector of weight at age data. The order of the vector is the order +the data frame was in before this function was called because it is just +extracting a column. } \description{ Get the weight at age data to be used in the model diff --git a/man/n_ages.Rd b/man/n_ages.Rd new file mode 100644 index 000000000..7981c616e --- /dev/null +++ b/man/n_ages.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/fimsframe.R +\name{n_ages} +\alias{n_ages} +\alias{n_ages,FIMSFrame-method} +\alias{n_ages,data.frame-method} +\title{Get the number of ages used in the model} +\usage{ +n_ages(x) + +\S4method{n_ages}{FIMSFrame}(x) + +\S4method{n_ages}{data.frame}(x) +} +\arguments{ +\item{x}{An object returned from \code{\link[=FIMSFrame]{FIMSFrame()}}.} +} +\value{ +A single integer. +} +\description{ +Get the number of ages used in the model +} diff --git a/man/n_lengths.Rd b/man/n_lengths.Rd new file mode 100644 index 000000000..d4e06d586 --- /dev/null +++ b/man/n_lengths.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/fimsframe.R +\name{n_lengths} +\alias{n_lengths} +\alias{n_lengths,FIMSFrame-method} +\alias{n_lengths,data.frame-method} +\title{Get the number of lengths used in the model} +\usage{ +n_lengths(x) + +\S4method{n_lengths}{FIMSFrame}(x) + +\S4method{n_lengths}{data.frame}(x) +} +\arguments{ +\item{x}{An object returned from \code{\link[=FIMSFrame]{FIMSFrame()}}.} +} +\value{ +A single integer. +} +\description{ +Get the number of lengths used in the model +} diff --git a/man/n_years.Rd b/man/n_years.Rd new file mode 100644 index 000000000..6bc052198 --- /dev/null +++ b/man/n_years.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/fimsframe.R +\name{n_years} +\alias{n_years} +\alias{n_years,FIMSFrame-method} +\alias{n_years,data.frame-method} +\title{Get the number of years to be used in the model} +\usage{ +n_years(x) + +\S4method{n_years}{FIMSFrame}(x) + +\S4method{n_years}{data.frame}(x) +} +\arguments{ +\item{x}{An object returned from \code{\link[=FIMSFrame]{FIMSFrame()}}.} +} +\value{ +A single integer. +} +\description{ +Get the number of years to be used in the model +} diff --git a/man/start_year.Rd b/man/start_year.Rd new file mode 100644 index 000000000..35832e6d9 --- /dev/null +++ b/man/start_year.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/fimsframe.R +\name{start_year} +\alias{start_year} +\alias{start_year,FIMSFrame-method} +\alias{start_year,data.frame-method} +\title{Get the first year used in the model} +\usage{ +start_year(x) + +\S4method{start_year}{FIMSFrame}(x) + +\S4method{start_year}{data.frame}(x) +} +\arguments{ +\item{x}{An object returned from \code{\link[=FIMSFrame]{FIMSFrame()}}.} +} +\value{ +A single integer. +} +\description{ +Get the first year used in the model +} diff --git a/man/weight_at_age.Rd b/man/weight_at_age.Rd new file mode 100644 index 000000000..ebf07e409 --- /dev/null +++ b/man/weight_at_age.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/fimsframe.R +\name{weight_at_age} +\alias{weight_at_age} +\alias{weight_at_age,FIMSFrame-method} +\alias{weight_at_age,data.frame-method} +\title{Get the weight at age data used in the model} +\usage{ +weight_at_age(x) + +\S4method{weight_at_age}{FIMSFrame}(x) + +\S4method{weight_at_age}{data.frame}(x) +} +\arguments{ +\item{x}{An object returned from \code{\link[=FIMSFrame]{FIMSFrame()}}.} +} +\value{ +A dataframe of weight at age data used in the model. +} +\description{ +Get the weight at age data used in the model +}