Skip to content

Commit

Permalink
Fixed window(FLPar)
Browse files Browse the repository at this point in the history
  • Loading branch information
iagomosqueira committed Dec 10, 2024
1 parent 5e45dbe commit 89bfd8a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: FLCore
Title: Core Package of FLR, Fisheries Modelling in R
Version: 2.6.20.9310
Version: 2.6.20.9311
Authors@R: c(
person("Iago", "Mosqueira", email = "iago.mosqueira@wur.nl",
role = "cre", comment=c(c(ORCID = "0000-0002-3252-0591"))),
Expand Down
4 changes: 2 additions & 2 deletions R/FLPar.R
Original file line number Diff line number Diff line change
Expand Up @@ -1038,10 +1038,10 @@ setMethod("window", signature(x="FLPar"),
res <- do.call(class(x), list(NA, units=units(x), dimnames=dnames))

# add data for matching years
dnames <- dnames[pos]
dnames <- dimnames(x)[pos]
names(dnames) <- c('i', 'j', 'k', 'l', 'm', 'n')[pos]

do.call('[<-', c(list(x=res, value=x), dimnames))
do.call('[<-', c(list(x=res, value=x), dnames))
}
) # }}}

Expand Down
10 changes: 0 additions & 10 deletions R/FLStockR.R
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,6 @@ setReplaceMethod("sr", signature(object="FLStockR", value="FLQuants"),

# }}}

# depletion {{{

setMethod("depletion", signature(x="FLStockR"),
function(x, B0=refpts(x)$SB0) {
unitSums(ssb(x)) / c(B0)
}
)
# }}}

# predict

# ffwd
Expand All @@ -212,7 +203,6 @@ setAs('FLStockR', 'FLStock',

setMethod("depletion", signature(x="FLStockR"),
function(x, SB0=refpts(x)$SB0) {
browser()
if(is.character(SB0))
SB0 <- refpts(x)[SB0,]

Expand Down

0 comments on commit 89bfd8a

Please sign in to comment.