Resolved compilation warnings on CRAN by replacing the deprecated arma::conv_to<double>::from() with arma::as_scalar(). This addresses an issue introduced by a recent RcppArmadillo update and ensures forward compatibility with the latest version of Armadillo.