Skip to content

Commit

Permalink
Fixed two bugs for R 4.3.3 (Finlay Scott)
Browse files Browse the repository at this point in the history
  • Loading branch information
iagomosqueira committed Mar 6, 2024
1 parent 93a5ada commit ccbf75f
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions 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.9001
Version: 2.6.20.9002
Authors@R: c(
person("Iago", "Mosqueira", email = "iago.mosqueira@wur.nl",
role = "cre", comment=c(c(ORCID = "0000-0002-3252-0591"))),
Expand Down Expand Up @@ -88,4 +88,4 @@ LazyLoad: Yes
LazyData: No
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
7 changes: 5 additions & 2 deletions R/FLModel.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,22 @@ setMethod('FLModel', signature(model='formula'),

# logLik {{{
setReplaceMethod('logLik', signature(object='FLModel', value='numeric'),
function(object, value, df='missing', nall='missing', nobs='missing')
{
function(object, df='missing', nall='missing', nobs='missing', value) {
# check length
#if(length(value) > 1)
# stop('value must be of length 1')

attr(value, 'class') <- 'logLik'

if(!missing(df))
attr(value, 'df') <- df

if(!missing(nall))
attr(value, 'nall') <- nall

if(!missing(nobs))
attr(value, 'nobs') <- nobs

slot(object, 'logLik') <- value
return(object)
}
Expand Down
3 changes: 2 additions & 1 deletion R/FLQuantDistr.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ setMethod("-",
#' @rdname Extract
#' @aliases [,FLQuantDistr,ANY,ANY,ANY-method
setMethod("[", signature(x="FLQuantDistr"),
function(x, i, j, k, l, m, n) {
function(x, i, j, k, l, m, n, drop=FALSE) {

dx <- dim(x)

Expand All @@ -220,6 +220,7 @@ setMethod("[", signature(x="FLQuantDistr"),
n <- seq(1, dx[6])

res <- x

res@.Data <- do.call('[', list(x=x@.Data, i=i, j=j, k=k, l=l,
m=m, n=n, drop=FALSE))
res@var <- do.call('[', list(x=x@var, i=i, j=j, k=k, l=l,
Expand Down
6 changes: 3 additions & 3 deletions man/apply-methods.Rd

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

2 changes: 1 addition & 1 deletion man/group.Rd

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

2 changes: 1 addition & 1 deletion man/predictModel.Rd

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

2 changes: 1 addition & 1 deletion man/units-FLCore.Rd

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

0 comments on commit ccbf75f

Please sign in to comment.