Skip to content

Commit

Permalink
Avoid issues with harvest iters
Browse files Browse the repository at this point in the history
  • Loading branch information
iagomosqueira committed Oct 11, 2022
1 parent 85f39b8 commit d5cfce1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/flxsa.R
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ setGeneric("FLXSA", function(stock, indices, ...)

setMethod("FLXSA", signature(stock="FLStock", indices="FLIndex"),
function(stock, indices, control=FLXSA.control(), diag.flag=TRUE) {
FLXSA(stock=stock, indices=FLIndices(indices), control=control, diag.flag=diag.flag)
FLXSA(stock=stock, indices=FLIndices(indices), control=control,
diag.flag=diag.flag)
}
)

Expand Down Expand Up @@ -291,7 +292,7 @@ setMethod("FLXSA", signature(stock="FLStock", indices="FLIndices"),
}
}

dimnames(res@harvest)$iter <- dimnames(harvest(stock))$iter
dimnames(res@harvest)$iter <- dimnames(stock.n(stock))$iter
dimnames(res@stock.n)$iter <- dimnames(stock.n(stock))$iter

res@harvest@units <- "f"
Expand Down
4 changes: 4 additions & 0 deletions R/xsa.sa.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
#' @param idx An FLIndices.
#'
#' @return A list containing the updated FLStock, and the tracking FLQuant.
#' @examples
#' data(ple4)
#' data(ple4.index)
#' xsa.sa(stk=ple4, idx=ple4.index, args=list(ay=2018), tracking=FLQuant())

xsa.sa <- function(stk, idx, args, tracking, ...) {

Expand Down
5 changes: 5 additions & 0 deletions man/xsa.sa.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d5cfce1

Please sign in to comment.