Skip to content

Commit

Permalink
Update input_functions.R
Browse files Browse the repository at this point in the history
Added "+ 1" to the meth-function for sequential numbering as otherwise the highest class could be missing.
  • Loading branch information
nmueller18 committed Mar 28, 2024
1 parent 80315ce commit 00a4fe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/input_functions.R
Expand Up @@ -122,7 +122,7 @@ prep.life.table=function(x, dec = NA, agebeg, ageend = NA, group = NA, method =
} else {
# If the "method" is not a character and of length 1 use the value as age class size and repeat.
if(length(method)==1){
meth=rep(method,ceiling(max(asd$ende,na.rm=T)/method))
meth=rep(method,ceiling(max(asd$ende + 1,na.rm=T)/method))
# If the "method" value is not of length 1 take the entry of "method" as method.
}else{
meth=method
Expand Down

0 comments on commit 00a4fe7

Please sign in to comment.