Skip to content

Commit

Permalink
fix an issue after RcppArmadillo release 0.11.4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
boennecd committed Oct 4, 2022
1 parent 73aa275 commit 3c59640
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: dynamichazard
Type: Package
Title: Dynamic Hazard Models using State Space Models
Version: 1.0.1
Version: 1.0.2
Authors@R: c(person("Benjamin", "Christoffersen",
email = "[email protected]",
role = c("cre", "aut"),
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# dynamichazard 1.0.2
* fix issues due to a new version of RcppArmadillo (0.11.4.0.1).

# dynamichazard 1.0.1
* fix issues with `match` after changes in R devel.

Expand Down
10 changes: 3 additions & 7 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
## Test environments
* Ubuntu 20.04 LTS with gcc 10.1.0
R version 4.1.1
R version 4.2.1
* Ubuntu 20.04 LTS with gcc 10.1.0
R version 4.1.1 with valgrind
* Ubuntu 20.04 LTS with gcc 10.1.0
R devel 2021-10-09 r81024 with ASAN and UBSAN
* Github actions on windows-latest (release), macOS-latest (release),
R devel 2022-06-09 r82474 with ASAN and UBSAN
* GitHub actions on windows-latest (release), macOS-latest (release),
ubuntu-20.04 (release), and ubuntu-20.04 (devel)
* win-builder (devel, oldrelease, and release)
* `rhub::check_for_cran()`
* `rhub::check(platform = c("fedora-clang-devel", "macos-highsierra-release-cran"))`

## R CMD check results
There were no WARNINGs or ERRORs.
Expand Down
7 changes: 3 additions & 4 deletions src/ddhazard_fit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ Rcpp::List ddhazard_fit_cpp(

// M-stp pointers for convenience
arma::mat *B, *V_less, *V;
arma::vec a_less, a;

const arma::ivec is_event_in_bin = Rcpp::as<arma::ivec>(risk_obj["is_event_in"]);

Expand Down Expand Up @@ -221,9 +220,9 @@ Rcpp::List ddhazard_fit_cpp(

V_less = &p_data->V_t_t_s.slice(t - 1);
V = &p_data->V_t_t_s.slice(t);
a_less = p_data->a_t_t_s.unsafe_col(t - 1);
a = p_data->a_t_t_s.unsafe_col(t);
arma::vec a_dt(a - p_data->state_trans->map(a_less).sv);
arma::vec a_dt
(p_data->a_t_t_s.col(t) -
p_data->state_trans->map(p_data->a_t_t_s.col(t - 1)).sv);

if(M_step_formulation == "Fahrmier94"){
B = &p_data->B_s.slice(t - 1);
Expand Down

0 comments on commit 3c59640

Please sign in to comment.