From eba4fbcdd00ba46e6669b660fee222e73537455c Mon Sep 17 00:00:00 2001 From: Robitzsch Date: Wed, 10 Jan 2024 09:40:11 +0100 Subject: [PATCH] 3.18-2 --- DESCRIPTION | 6 ++-- NAMESPACE | 6 ++-- R/RcppExports.R | 2 +- R/complete.miceadds.R | 25 +++++++------- R/datalist2mids.R | 2 +- R/mice.1chain.R | 4 +-- R/systime.R | 3 +- README.md | 6 ++-- inst/CITATION | 2 +- inst/NEWS | 23 ++++++++++--- man/complete.miceadds.Rd | 13 +++++--- src/RcppExports.cpp | 70 ++++++++++++++++++++-------------------- 12 files changed, 91 insertions(+), 71 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8e60b44..e4f7ff3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: miceadds Type: Package Title: Some Additional Multiple Imputation Functions, Especially for 'mice' -Version: 3.17-34 -Date: 2023-10-20 20:14:09.576992 +Version: 3.18-2 +Date: 2024-01-10 09:23:28 Author: Alexander Robitzsch [aut,cre] (), Simon Grund [aut] (), @@ -47,7 +47,7 @@ Enhances: simputation URL: https://github.com/alexanderrobitzsch/miceadds, - https://sites.google.com/site/alexanderrobitzsch2/software + https://sites.google.com/view/alexander-robitzsch/software License: GPL (>= 2) BugReports: diff --git a/NAMESPACE b/NAMESPACE index 67bb92c..4e9a743 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -166,8 +166,8 @@ importFrom(Rcpp, sourceCpp) ############################# ## exports -export(complete.mids.1chain) -export(complete.mids.nmi) +# export(complete.mids.1chain) +# export(complete.mids.nmi) export(create.designMatrices.waldtest) export(crlrem) export(cwc) @@ -371,6 +371,8 @@ S3method(coef, mipo.nmi) S3method(coef, ml_mcmc) S3method(coef, pool_mi) S3method(coef, lmer_vcov) +S3method(complete, mids.1chain) +S3method(complete, mids.nmi) S3method(MIcombine, NestedImputationResultList) S3method(plot, mids.1chain) S3method(plot, ml_mcmc) diff --git a/R/RcppExports.R b/R/RcppExports.R index 98d8a0b..3f9a0c2 100644 --- a/R/RcppExports.R +++ b/R/RcppExports.R @@ -1,5 +1,5 @@ ## File Name: RcppExports.R -## File Version: 3.017034 +## File Version: 3.018002 # Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 diff --git a/R/complete.miceadds.R b/R/complete.miceadds.R index 9089575..38baeca 100644 --- a/R/complete.miceadds.R +++ b/R/complete.miceadds.R @@ -1,27 +1,26 @@ ## File Name: complete.miceadds.R -## File Version: 0.11 +## File Version: 0.124 - -####################################################### -# complete function for nested multiple imputation -complete.mids.nmi <- function( x, action=c(1,1) ) +#*** complete function for nested multiple imputation +complete.mids.nmi <- function( data, action=c(1,1), ... ) { + x <- data if ( x$type=="mice" ){ x1 <- x$imp - data <- mice::complete( x1[[ action[1] ]], action=action[2] ) + data <- mice::complete( data=x1[[ action[1] ]], action=action[2], ... ) } if ( x$type=="mice.1chain" ){ - data <- complete.mids.1chain( x$imp[[ action[1] ]], action=action[2] ) + data <- complete.mids.1chain( x$imp[[ action[1] ]], action=action[2], ...) } return(data) } -####################################################### -####################################################### -# complete function for objects of class mids.1chain -complete.mids.1chain <- function( x, action=1 ) +#*** complete function for objects of class mids.1chain +complete.mids.1chain <- function( data, action=1, ...) { - mice::complete( x$midsobj, action=action ) + x <- data + data <- mice::complete( data=x$midsobj, action=action, ...) + return(data) } -####################################################### + diff --git a/R/datalist2mids.R b/R/datalist2mids.R index 13acd2a..385dbab 100644 --- a/R/datalist2mids.R +++ b/R/datalist2mids.R @@ -1,5 +1,5 @@ ## File Name: datalist2mids.R -## File Version: 0.41 +## File Version: 0.432 datalist2mids <- function( dat.list, progress=FALSE ) { diff --git a/R/mice.1chain.R b/R/mice.1chain.R index 60a56f8..c2dff2a 100644 --- a/R/mice.1chain.R +++ b/R/mice.1chain.R @@ -1,5 +1,5 @@ ## File Name: mice.1chain.R -## File Version: 0.672 +## File Version: 0.673 #*** apply mice algorithm in a single chain mice.1chain <- function(data, burnin=10, iter=20, Nimp=10, @@ -59,7 +59,7 @@ mice.1chain <- function(data, burnin=10, iter=20, Nimp=10, implist[[mm+1]] <- imp1 <- mice::mice( data, maxit=maxit_temp, m=1, method=method, where=where, visitSequence=visitSequence, blots=blots, post=post, defaultMethod=defaultMethod, - printFlag=printFlag, seed=seed, + printFlag=printFlag, seed=seed, data.init=mice::complete(implist[[mm]], action=1), ... ) datlist[[mm]] <- dat0 <- mice::complete( imp1, 1 ) chainMean <- rbind( chainMean, t( imp1$chainMean[,,1] ) ) diff --git a/R/systime.R b/R/systime.R index 775ed17..346fc7c 100644 --- a/R/systime.R +++ b/R/systime.R @@ -1,11 +1,12 @@ ## File Name: systime.R -## File Version: 0.11 +## File Version: 0.124 #-- several variants for getting system time systime <- function() { s1 <- paste(Sys.time()) + s1 <- substring(s1,1,19) res <- c( s1, substring( s1, 1,10) ) res <- c(res, gsub("-","",res[2] ) ) s1a <- substring( s1, 1, 16 ) diff --git a/README.md b/README.md index ecd9936..7333d51 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ all necessary information on the used librarys, the R version, and the OS it is The manual can be found here [https://alexanderrobitzsch.github.io/miceadds/](https://alexanderrobitzsch.github.io/miceadds/) -#### CRAN version `miceadds` 3.16-18 (2023-01-06) +#### CRAN version `miceadds` 3.17-44 (2024-01-08) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version-last-release/miceadds)](https://cran.r-project.org/package=miceadds) @@ -24,9 +24,9 @@ The CRAN version can be installed from within R using: utils::install.packages("miceadds") ``` -#### GitHub version `miceadds` 3.17-34 (2023-10-20) +#### GitHub version `miceadds` 3.18-2 (2024-01-10) -[![](https://img.shields.io/badge/github%20version-3.17--34-orange.svg)](https://github.com/alexanderrobitzsch/miceadds)   +[![](https://img.shields.io/badge/github%20version-3.18--2-orange.svg)](https://github.com/alexanderrobitzsch/miceadds)   The version hosted [here](https://github.com/alexanderrobitzsch/miceadds) is the development version of `miceadds`. The GitHub version can be installed from within R using: diff --git a/inst/CITATION b/inst/CITATION index 561a40e..b2c9db9 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -25,7 +25,7 @@ citHeader( paste0( "To cite the '", pkg , "' package in publications use:") ) bibentry(key = paste0(pkg, "_", meta$Version), bibtype = "Manual", title = paste0( pkg , ": " , pkg_title ) , - author = personList( person_list1 ), + author = c( person_list1 ), year = year, note = vers, url = paste0( "https://CRAN.R-project.org/package=", pkg) , diff --git a/inst/NEWS b/inst/NEWS index 5a6f3c0..dbbfacc 100644 --- a/inst/NEWS +++ b/inst/NEWS @@ -44,21 +44,34 @@ CHANGELOG miceadds -------------------------------------------------------------------------- -VERSIONS miceadds 3.17 | 2023-10-20 | Last: miceadds 3.17-34 +VERSIONS miceadds 3.18 | 2024-01-10 | Last: miceadds 3.18-2 +-------------------------------------------------------------------------- + +xxx * --- + + +DATA * --- +EXAMP * --- + + + +-------------------------------------------------------------------------- +VERSIONS miceadds 3.17 | 2024-01-08 | Last: miceadds 3.17-44 -------------------------------------------------------------------------- ADDED * added argument 'derived_vars' in mice.impute.pls() for including derived variables in PLS dimension reduction (requested by Karoline Sachse) FIXED * fixed specification issues in mice.1chain() - +NOTE * rechanged functionality of systime() due to changes of the + Sys.time() function since R 4.3.1 +NOTE * complete functions in miceadds are now declared as a method in + the manual. Moreover, renamed argument 'x' into 'data' + (requested by Kurt Hornik from the CRAN team) DATA * --- EXAMP * mice.impute.pls (1), lm.cluster (3) - - - -------------------------------------------------------------------------- VERSIONS miceadds 3.16 | 2023-01-06 | Last: miceadds 3.16-18 -------------------------------------------------------------------------- diff --git a/man/complete.miceadds.Rd b/man/complete.miceadds.Rd index fd99acf..3c72b49 100644 --- a/man/complete.miceadds.Rd +++ b/man/complete.miceadds.Rd @@ -1,5 +1,5 @@ %% File Name: complete.miceadds.Rd -%% File Version: 0.20 +%% File Version: 0.214 \name{complete.miceadds} \alias{complete.mids.nmi} @@ -17,14 +17,18 @@ Creates imputed dataset from a \code{mids.nmi} or \code{mids.1chain} object. } \usage{ -complete.mids.nmi( x, action=c(1,1) ) +\method{complete}{mids.nmi}(data, action=c(1,1), ...) -complete.mids.1chain( x, action=1 ) +\method{complete}{mids.1chain}(data, action=1, ...) } +% complete.mids.nmi( x, action=c(1,1) ) + +% complete.mids.1chain( x, action=1 ) + %- maybe also 'usage' for other objects documented here. \arguments{ -\item{x}{ +\item{data}{ Object of class \code{mids.nmi} (for \code{complete.mids.nmi}) or \code{mids.1chain} (for \code{complete.mids.1chain}) } @@ -33,6 +37,7 @@ A vector of length two indicating to indices of between and within imputed dataset for for \code{complete.mids.nmi} and an integer for the index of imputed dataset for \code{complete.mids.1chain}. } +\item{\dots}{More arguments to be passed} } %\details{ diff --git a/src/RcppExports.cpp b/src/RcppExports.cpp index 02c773d..014df11 100644 --- a/src/RcppExports.cpp +++ b/src/RcppExports.cpp @@ -1,5 +1,5 @@ //// File Name: RcppExports.cpp -//// File Version: 3.017034 +//// File Version: 3.018002 // Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 @@ -117,7 +117,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_sampler(SEXP y_obsSEXP, SEXP XSE if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -152,7 +152,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_arma_chol_ridge(SEXP sigma0SEXP, SEXP ri if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -188,7 +188,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_mvrnorm(SEXP muSEXP, SEXP sigmaSEXP, SEX if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -224,7 +224,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_rwishart(SEXP dfSEXP, SEXP SSEXP, SEXP r if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -260,7 +260,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_riwishart(SEXP dfSEXP, SEXP SSEXP, SEXP if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -297,7 +297,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_rtnorm_double(SEXP muSEXP, SEXP sigmaSEX if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -334,7 +334,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_rtnorm(SEXP muSEXP, SEXP sigmaSEXP, SEXP if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -368,7 +368,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_arma2vec(SEXP xSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -404,7 +404,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_pnorm(SEXP xSEXP, SEXP muSEXP, SEXP sigm if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -440,7 +440,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_qnorm(SEXP xSEXP, SEXP muSEXP, SEXP sigm if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -479,7 +479,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_rtnorm2(SEXP muSEXP, SEXP sigma0SEXP, SE if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -513,7 +513,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_compute_xtx(SEXP XSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -549,7 +549,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_compute_ztz(SEXP ZSEXP, SEXP idc if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -584,7 +584,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_predict_fixed(SEXP XSEXP, SEXP b if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -620,7 +620,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_subtract_fixed(SEXP ySEXP, SEXP if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -656,7 +656,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_predict_random(SEXP ZSEXP, SEXP if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -694,7 +694,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_predict_random_list(SEXP Z_listS if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -733,7 +733,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_predict_fixed_random(SEXP XSEXP, if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -771,7 +771,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_subtract_random(SEXP ySEXP, SEXP if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -814,7 +814,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_sample_beta(SEXP xtx_invSEXP, SE if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -860,7 +860,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_sample_u(SEXP XSEXP, SEXP betaSE if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -894,7 +894,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_crossprod_one_matrix(SEXP XSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -931,7 +931,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_sample_covariance_matrix(SEXP uS if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -969,7 +969,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_print_arma_mat(SEXP xSEXP, SEXP row1SEXP if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1007,7 +1007,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_sample_psi(SEXP u_listSEXP, SEXP if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1044,7 +1044,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_sample_variance(SEXP eSEXP, SEXP if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1088,7 +1088,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_sample_sigma2(SEXP ySEXP, SEXP X if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1131,7 +1131,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_sample_latent_probit(SEXP XSEXP, if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1166,7 +1166,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_probit_fill_index_lower(SEXP y_i if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1201,7 +1201,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_probit_fill_index_upper(SEXP y_i if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1238,7 +1238,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_probit_category_prob(SEXP y_intS if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1275,7 +1275,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_probit_loglike(SEXP y_intSEXP, S if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1310,7 +1310,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_rnorm_double(SEXP muSEXP, SEXP sigmaSEXP if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1353,7 +1353,7 @@ RcppExport SEXP _miceadds_miceadds_rcpp_ml_mcmc_sample_thresholds(SEXP XSEXP, SE if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen;