LCBC-UiO/galamm

Failure on old R release

osorensen opened this issue · 1 comments

The package fails on old R releases, i.e., on R4.2.3. This happens because the family objects don't have a dispersion element prior to R4.3.0.

Here is the code causing error:

galamm/R/galamm.R

Lines 460 to 461 in 7cd848a

df = length(opt$par) +
sum(vapply(family_list, function(x) is.na(x$dispersion), logical(1))),

Here is the fix:

galamm/R/galamm.R

Lines 460 to 464 in fa2af07

df = length(opt$par) +
sum(vapply(
family_list,
function(x) !x$family %in% c("binomial", "poisson"),
logical(1))),

Solved by #168