Skip to content

Commit

Permalink
age mig fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hanase committed Dec 10, 2024
1 parent b19ea6d commit e4e420d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: bayesPop
Type: Package
Title: Probabilistic Population Projection
Version: 10.0-1.9020
Date: 2024-12-08
Version: 10.0-1.9021
Date: 2024-12-10
Author: Hana Sevcikova, Adrian Raftery, Thomas Buettner
Maintainer: Hana Sevcikova <[email protected]>
Depends: R (>= 3.5.0), bayesTFR (>= 7.1-0), bayesLife (>= 5.0-0), MortCast (>= 2.6-1)
Expand Down
6 changes: 3 additions & 3 deletions R/predict_subnat.R
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ load.subnat.inputs <- function(inputs, start.year, present.year, end.year, wpp.y
if(!is.null((rates <- attr(miginp[["migM"]], "rate")))){
if(length(intersect(proj.periods, colnames(rates))) > 0) {
attr(MIGm, "rate") <- rates[, c('country_code', intersect(proj.periods, colnames(rates))), with = FALSE]
attr(MIGm, "code") <- attr(miginp[["migM"]], "code")[, c('country_code', proj.periods), with = FALSE]
attr(MIGm, "code") <- attr(miginp[["migM"]], "code")[, c('country_code', intersect(proj.periods, colnames(code))), with = FALSE]
} else {
attr(MIGm, "rate") <- NULL
attr(MIGm, "code") <- NULL
Expand All @@ -346,8 +346,8 @@ load.subnat.inputs <- function(inputs, start.year, present.year, end.year, wpp.y
}
if(!is.null((rates <- attr(miginp[["migF"]], "rate")))){
if(length(intersect(proj.periods, colnames(rates))) > 0) {
attr(MIGf, "rate") <- rates[, c('country_code', proj.periods), with = FALSE]
attr(MIGf, "code") <- attr(miginp[["migF"]], "code")[, c('country_code', proj.periods), with = FALSE]
attr(MIGf, "rate") <- rates[, c('country_code', intersect(proj.periods, colnames(rates))), with = FALSE]
attr(MIGf, "code") <- attr(miginp[["migF"]], "code")[, c('country_code', intersect(proj.periods, colnames(code))), with = FALSE]
} else {
attr(MIGf, "rate") <- NULL
attr(MIGf, "code") <- NULL
Expand Down

0 comments on commit e4e420d

Please sign in to comment.