Fix deprecated arma::is_finite calls to resolve CRAN warnings #60
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes CRAN package check warnings caused by deprecated
arma::is_finite()function calls in the C++ code. The warnings were appearing across multiple R platforms and preventing successful CRAN submission.Issue
CRAN checks were failing with deprecation warnings:
Changes
#include <cmath>header tosrc/infection.cppto supportstd::isfinite()arma::is_finite(times(i))withstd::isfinite(times(i))at two locations:infection_cpp()functionsusceptibility_cpp()functionTesting
sourceCpp()std::isfinite()has identical behavior toarma::is_finite()for finite/NaN/infinite valuesThis minimal change addresses the exact deprecation warnings specified by CRAN and should allow the package to pass all checks for resubmission.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
cloud.r-project.org/usr/lib/R/bin/exec/R -e .libPaths('~/R/library');~+~install.packages(c('Rcpp',~+~'RcppArmadillo'),~+~repos='REDACTED')(dns block)esm.ubuntu.com/usr/lib/apt/methods/https(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This section details on the original issue you should resolve
<issue_title>Fix issues associated with Rcpp</issue_title>
<issue_description>I recently got this email from CRAN about the R package. We need to fix the issues associated with the changes in the Rcpp package to resubmit the package to CRAN.
More details