mrc-ide / leapfrog

Multistate population projection model for demographic estimation.
Other
2 stars 5 forks source link

Alternate Rcpp:List constructor for long lists #42

Closed jeffeaton closed 1 year ago

jeffeaton commented 1 year ago

This uses an alternate constructor posted on Github issue by Kevin Usher (thanks!!): https://github.com/RcppCore/Rcpp/issues/243#issuecomment-73378636

I also noticed that ctx_effect had been declared as an int. This should be a double I think: const double ctx_effect = 0.33;. Have fixed that in the PR.

It compiles now, but when I tried to test running, I got an error (I think a missing file in the pushed branch):

> hivp <- prepare_leapfrog_projp(pjnz)
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
  cannot open file 'tests/testdata/spectrum/v6.13/paed_art_dist.csv': No such file or directory

So leaving for you to test :smile:.

In reviewing the code, I noticed a couple of other things interested to discuss: