if(all(!is.na(int)) & any(int<0)){
cat("Negative values were turned 0. No accepted in population counts, fertility rates or life table functions.\n")
int[int<0] <- 0
}
In interp_coh.R it is being used to interpolate logit(qx) which is mostly negative. Maybe there should be an option that indicates whether negative values are ok. Maybe NegativeOK = TRUE/FALSE? Default to FALSE to be consistent with current version.
In the
interp
function, lines 286-289:In
interp_coh.R
it is being used to interpolate logit(qx) which is mostly negative. Maybe there should be an option that indicates whether negative values are ok. MaybeNegativeOK = TRUE/FALSE
? Default toFALSE
to be consistent with current version.