Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hanase committed Dec 12, 2024
1 parent 87dc4c6 commit 6399eb6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 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.9023
Date: 2024-12-10
Version: 10.0-1.9024
Date: 2024-12-12
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
4 changes: 2 additions & 2 deletions R/predict.pop.R
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ load.inputs <- function(inputs, start.year, present.year, end.year, wpp.year, fi
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', intersect(proj.periods, colnames(code))), with = FALSE]
attr(MIGm, "code") <- attr(miginp[["migM"]], "code")[, c('country_code', intersect(proj.periods, colnames(attr(miginp[["migM"]], "code")))), with = FALSE]
} else {
attr(MIGm, "rate") <- NULL
attr(MIGm, "code") <- NULL
Expand All @@ -650,7 +650,7 @@ load.inputs <- function(inputs, start.year, present.year, end.year, wpp.year, fi
if(!is.null((rates <- attr(miginp[["migF"]], "rate")))){
if(length(intersect(proj.periods, colnames(rates))) > 0) {
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]
attr(MIGf, "code") <- attr(miginp[["migF"]], "code")[, c('country_code', intersect(proj.periods, colnames(attr(miginp[["migF"]], "code")))), with = FALSE]
} else {
attr(MIGf, "rate") <- NULL
attr(MIGf, "code") <- NULL
Expand Down
4 changes: 2 additions & 2 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', intersect(proj.periods, colnames(code))), with = FALSE]
attr(MIGm, "code") <- attr(miginp[["migM"]], "code")[, c('country_code', intersect(proj.periods, colnames(attr(miginp[["migM"]], "code")))), with = FALSE]
} else {
attr(MIGm, "rate") <- NULL
attr(MIGm, "code") <- NULL
Expand All @@ -347,7 +347,7 @@ 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', intersect(proj.periods, colnames(rates))), with = FALSE]
attr(MIGf, "code") <- attr(miginp[["migF"]], "code")[, c('country_code', intersect(proj.periods, colnames(code))), with = FALSE]
attr(MIGf, "code") <- attr(miginp[["migF"]], "code")[, c('country_code', intersect(proj.periods, attr(miginp[["migF"]], "code"))), with = FALSE]
} else {
attr(MIGf, "rate") <- NULL
attr(MIGf, "code") <- NULL
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![R build status](https://github.com/PPgp/bayesPop/workflows/R-CMD-check/badge.svg?branch=master)](https://github.com/PPgp/bayesPop/actions?workflow=R-CMD-check)


R package for obtaining probabilisitc population projections. [This paper](http://www.unece.org/fileadmin/DAM/stats/documents/ece/ces/ge.11/2013/WP_13.2.pdf)
R package for obtaining probabilistic population projections. [This paper](http://www.unece.org/fileadmin/DAM/stats/documents/ece/ces/ge.11/2013/WP_13.2.pdf)
shows how to use it.

If for any reason the package is not on CRAN or you would like the latest development version, install it from here as follows:
Expand Down

0 comments on commit 6399eb6

Please sign in to comment.