diff --git a/DESCRIPTION b/DESCRIPTION index 455a1573..eae4df2e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: FLCore Title: Core Package of FLR, Fisheries Modelling in R -Version: 2.6.20.9314 +Version: 2.6.20.9315 Authors@R: c( person("Iago", "Mosqueira", email = "iago.mosqueira@wur.nl", role = "cre", comment=c(c(ORCID = "0000-0002-3252-0591"))), @@ -88,4 +88,4 @@ LazyLoad: Yes LazyData: No Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 diff --git a/R/FLQuantDistr.R b/R/FLQuantDistr.R index ca9da4da..8ce07f33 100644 --- a/R/FLQuantDistr.R +++ b/R/FLQuantDistr.R @@ -198,7 +198,8 @@ setMethod("-", } ) # }}} -## "[" {{{ +# [ {{{ + #' @rdname Extract #' @aliases [,FLQuantDistr,ANY,ANY,ANY-method setMethod("[", signature(x="FLQuantDistr"), @@ -247,6 +248,16 @@ setMethod("[", signature(x="FLQuantDistr", i="array", j="missing", drop="missing # }}} +# [<- {{{ + +setMethod("[<-", signature(x="FLQuantDistr", value="FLQuant"), + function(x, i, j, k, l, m, n, ..., value) { + x@.Data[i,j,k,l,m,n] <- value + return(x) + } +) +# }}} + # sums {{{ #' @rdname dimSummaries setMethod('yearSums', signature(x='FLQuantDistr'), function(x, na.rm=TRUE) { diff --git a/man/Extract.Rd b/man/Extract.Rd index 8085202c..6041fe3d 100644 --- a/man/Extract.Rd +++ b/man/Extract.Rd @@ -44,7 +44,7 @@ \S4method{$}{FLQuant}(x, name) -\S4method{[}{FLQuantDistr,ANY,ANY,ANY}(x, i, j, k, l, m, n) +\S4method{[}{FLQuantDistr,ANY,ANY,ANY}(x, i, j, k, l, m, n, drop = FALSE) \S4method{[}{FLQuantDistr,array,missing,missing}(x, i) diff --git a/man/SRModels.Rd b/man/SRModels.Rd index 3081b5e3..e286fc69 100644 --- a/man/SRModels.Rd +++ b/man/SRModels.Rd @@ -30,6 +30,7 @@ \alias{sv2ab} \alias{bevholtDa} \alias{bevholtss3} +\alias{segregDa} \alias{cushing} \alias{rickerSV} \alias{bevholtSV} @@ -54,6 +55,8 @@ bevholtss3() segreg() +segregDa() + geomean() shepherd() diff --git a/man/mbar.Rd b/man/mbar.Rd deleted file mode 100644 index a7ce6c58..00000000 --- a/man/mbar.Rd +++ /dev/null @@ -1,29 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/FLStock.R -\name{mbar} -\alias{mbar} -\title{Computes the mean natural mortality acros the fully selected ages} -\usage{ -mbar(object, ...) -} -\arguments{ -\item{object}{An object of class 'FLStock'.} -} -\value{ -An object of class 'FLQuant'. -} -\description{ -Equivalent to the mean fishing mortality metric returned by 'fbar', 'mbar' -calculates the mean natural mortality across the ages inside the range defined -by 'minfbar' and 'maxfbar'. -} -\examples{ -data(ple4) -mbar(ple4) -} -\seealso{ -\link{fbar} -} -\author{ -The FLR Team, proposal by H. Winker. -} diff --git a/man/show.Rd b/man/show.Rd index c0d7806e..d121b58d 100644 --- a/man/show.Rd +++ b/man/show.Rd @@ -9,10 +9,13 @@ \title{Method show} \usage{ \S4method{show}{FLArray}(object) + +\S4method{print}{FLArray}(x) } \description{ -Standard display of an object contents in an interactive session. Objects of -class \code{\linkS4class{FLQuant}} with length > 1 along the sixth dimension +Standard complete display of an object contents in an interactive session. +Objects of class \code{\linkS4class{FLArray}} with length > 1 alonArray +sixth dimension (\emph{iter}) are output in a summarised form, as \code{median(mad)}, where mad is the median absolute deviation. See \code{\link[stats]{mad}}. } @@ -22,6 +25,8 @@ length > 1 on the last dimension (\emph{iter}). } \section{Generic function}{ show(object) + + show(object) } \examples{ @@ -34,8 +39,18 @@ length > 1 on the last dimension (\emph{iter}). flq <- FLQuant(rnorm(800), dim=c(4,20,1,1,1,10), quant='age', units='kg') flq + +# no 'iter' + flq <- FLQuant(rnorm(80), dim=c(4,20), quant='age', units='kg') + print(flq) + +# with 'iter' + flq <- FLQuant(rnorm(800), dim=c(4,20,1,1,1,10), quant='age', units='kg') + print(flq) } \seealso{ +\link{FLComp} + \link{FLComp} } \author{ diff --git a/man/summary-methods.Rd b/man/summary-methods.Rd index 586f041c..e6f3c862 100644 --- a/man/summary-methods.Rd +++ b/man/summary-methods.Rd @@ -17,7 +17,7 @@ \alias{summary,FLlst-methods} \title{Method summary} \usage{ -\S4method{summary}{FLArray}(object, ...) +\S4method{summary}{FLArray}(object, .class = TRUE, ...) \S4method{summary}{FLQuantPoint}(object, ...) diff --git a/man/survey.Rd b/man/survey.Rd index 4135c706..bb8be197 100644 --- a/man/survey.Rd +++ b/man/survey.Rd @@ -26,7 +26,7 @@ survey(object, index, ...) sel = sel.pattern(index), ages = ac(seq(range(index, c("min")), range(index, c("max")))), timing = mean(range(index, c("startf", "endf"))), - catch.wt = stock.wt(object)[, dimnames(index)$year], + catch.wt = index@catch.wt, index.q = index@index.q, stability = 1 )