From 015608935c69e4442303b7d1ca3ef6bf2b99fc3d Mon Sep 17 00:00:00 2001 From: Daniel Lewandowski Date: Mon, 16 Sep 2024 20:28:35 +0200 Subject: [PATCH] Prepare code for move to ECDC repository --- .github/workflows/R-CMD-check.yaml | 11 +++++++-- DESCRIPTION | 4 ++-- NAMESPACE | 2 +- R/GetSystemFile.R | 2 +- R/HivEstInfTime-package.R | 4 ++-- R/RcppExports.R | 12 +++++----- R/onUnload.R | 2 +- README.md | 5 ++--- inst/include/GetLogMVNPdf.hpp | 8 +++---- inst/include/Lspline.hpp | 4 ++-- inst/include/MeanPostW.hpp | 8 +++---- inst/include/PostW.hpp | 8 +++---- inst/include/UpdateCD4DesignMatrix.hpp | 8 +++---- inst/include/UpdateRandEffDesignMatrix.hpp | 8 +++---- inst/include/UpdateVLDesignMatrix.hpp | 8 +++---- man/HivEstInfTime.Rd | 8 +++---- misc/Playground.R | 4 ++-- misc/Test.R | 6 ++--- src/RcppExports.cpp | 26 +++++++++++----------- src/exports.cpp | 12 +++++----- utils/Update local dependencies.R | 2 ++ 21 files changed, 80 insertions(+), 72 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 7054877..50ccf02 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,5 +1,6 @@ on: - push + workflow_dispatch: + push: name: R-CMD-check @@ -30,10 +31,16 @@ jobs: r-version: ${{ matrix.config.r }} use-public-rspm: true + - name: Install libcurl on Linux + if: runner.os == 'Linux' + run: sudo apt-get update -y && sudo apt-get install -y libcurl4-openssl-dev + - uses: r-lib/actions/setup-r-dependencies@v2 with: dependencies: '"hard"' - extra-packages: any::rcmdcheck + extra-packages: | + any::rcmdcheck + any::testthat - uses: r-lib/actions/check-r-package@v2 env: diff --git a/DESCRIPTION b/DESCRIPTION index c641c5a..0beb254 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,4 +1,4 @@ -Package: HivEstInfTime +Package: hivEstInfTime Type: Package Title: HIV Infection Time Estimation Version: 1.0.3 @@ -20,6 +20,6 @@ Imports: stats Encoding: UTF-8 LazyData: true -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 Suggests: haven LinkingTo: Rcpp, RcppArmadillo, RcppEigen, RcppNumerical diff --git a/NAMESPACE b/NAMESPACE index 05467e0..b3d0ab5 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -14,4 +14,4 @@ importFrom(stats,formula) importFrom(stats,model.matrix) importFrom(stats,runif) importFrom(utils,read.csv) -useDynLib(HivEstInfTime, .registration = TRUE) +useDynLib(hivEstInfTime, .registration = TRUE) diff --git a/R/GetSystemFile.R b/R/GetSystemFile.R index 8d1a726..b139984 100644 --- a/R/GetSystemFile.R +++ b/R/GetSystemFile.R @@ -1,6 +1,6 @@ GetSystemFile <- function( ..., - package = 'HivEstInfTime' + package = 'hivEstInfTime' ) { return(system.file(..., package = package)) } diff --git a/R/HivEstInfTime-package.R b/R/HivEstInfTime-package.R index fd06789..c016a83 100644 --- a/R/HivEstInfTime-package.R +++ b/R/HivEstInfTime-package.R @@ -1,4 +1,4 @@ -#' @name HivEstInfTime +#' @name hivEstInfTime #' #' @title #' HIV Infection Time Estimation @@ -17,5 +17,5 @@ #' @importFrom utils read.csv #' @import data.table #' -#' @useDynLib HivEstInfTime, .registration = TRUE +#' @useDynLib hivEstInfTime, .registration = TRUE "_PACKAGE" diff --git a/R/RcppExports.R b/R/RcppExports.R index 8293fc4..5ede01c 100644 --- a/R/RcppExports.R +++ b/R/RcppExports.R @@ -2,26 +2,26 @@ # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 Lspline <- function(x, knots) { - .Call(`_HivEstInfTime_Lspline`, x, knots) + .Call(`_hivEstInfTime_Lspline`, x, knots) } GetLogMVNPdf <- function(x, mu, sigma) { - .Call(`_HivEstInfTime_GetLogMVNPdf`, x, mu, sigma) + .Call(`_hivEstInfTime_GetLogMVNPdf`, x, mu, sigma) } PostW <- function(w, y, xAIDS, maxDTime, betaAIDS, kappa, bFE, varCovRE, baseCD4DM, fxCD4Data, baseVLDM, fxVLData, baseRandEffDM, fzData, err) { - .Call(`_HivEstInfTime_PostW`, w, y, xAIDS, maxDTime, betaAIDS, kappa, bFE, varCovRE, baseCD4DM, fxCD4Data, baseVLDM, fxVLData, baseRandEffDM, fzData, err) + .Call(`_hivEstInfTime_PostW`, w, y, xAIDS, maxDTime, betaAIDS, kappa, bFE, varCovRE, baseCD4DM, fxCD4Data, baseVLDM, fxVLData, baseRandEffDM, fzData, err) } VPostW <- function(w, y, xAIDS, maxDTime, betaAIDS, kappa, bFE, varCovRE, baseCD4DM, fxCD4Data, baseVLDM, fxVLData, baseRandEffDM, fzData, err) { - .Call(`_HivEstInfTime_VPostW`, w, y, xAIDS, maxDTime, betaAIDS, kappa, bFE, varCovRE, baseCD4DM, fxCD4Data, baseVLDM, fxVLData, baseRandEffDM, fzData, err) + .Call(`_hivEstInfTime_VPostW`, w, y, xAIDS, maxDTime, betaAIDS, kappa, bFE, varCovRE, baseCD4DM, fxCD4Data, baseVLDM, fxVLData, baseRandEffDM, fzData, err) } IntegratePostW <- function(lower, upper, y, xAIDS, maxDTime, betaAIDS, kappa, bFE, varCovRE, baseCD4DM, fxCD4Data, baseVLDM, fxVLData, baseRandEffDM, fzData, err) { - .Call(`_HivEstInfTime_IntegratePostW`, lower, upper, y, xAIDS, maxDTime, betaAIDS, kappa, bFE, varCovRE, baseCD4DM, fxCD4Data, baseVLDM, fxVLData, baseRandEffDM, fzData, err) + .Call(`_hivEstInfTime_IntegratePostW`, lower, upper, y, xAIDS, maxDTime, betaAIDS, kappa, bFE, varCovRE, baseCD4DM, fxCD4Data, baseVLDM, fxVLData, baseRandEffDM, fzData, err) } IntegrateMeanPostW <- function(lower, upper, y, xAIDS, maxDTime, betaAIDS, kappa, bFE, varCovRE, baseCD4DM, fxCD4Data, baseVLDM, fxVLData, baseRandEffDM, fzData, err) { - .Call(`_HivEstInfTime_IntegrateMeanPostW`, lower, upper, y, xAIDS, maxDTime, betaAIDS, kappa, bFE, varCovRE, baseCD4DM, fxCD4Data, baseVLDM, fxVLData, baseRandEffDM, fzData, err) + .Call(`_hivEstInfTime_IntegrateMeanPostW`, lower, upper, y, xAIDS, maxDTime, betaAIDS, kappa, bFE, varCovRE, baseCD4DM, fxCD4Data, baseVLDM, fxVLData, baseRandEffDM, fzData, err) } diff --git a/R/onUnload.R b/R/onUnload.R index 5469647..ff3e56b 100644 --- a/R/onUnload.R +++ b/R/onUnload.R @@ -1,6 +1,6 @@ .onUnload <- function(libPath, pkgname) { - library.dynam.unload('HivEstInfTime', libPath) + library.dynam.unload('hivEstInfTime', libPath) invisible(NULL) } diff --git a/README.md b/README.md index 63a3d0a..975e121 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # Status -[![R-CMD-check](https://github.com/nextpagesoft/HivEstInfTime/workflows/R-CMD-check/badge.svg)](https://github.com/nextpagesoft/HivEstInfTime/actions) +[![R-CMD-check](../../actions/workflows/R-CMD-check.yaml/badge.svg)](../../actions/workflows/R-CMD-check.yaml) # License -See the [LICENSE](https://github.com/nextpagesoft/HivEstInfTime/blob/master/LICENSE) file for -license rights and limitations (EUPL-1.2). +See the [LICENSE](./LICENSE) file for license rights and limitations (EUPL-1.2). diff --git a/inst/include/GetLogMVNPdf.hpp b/inst/include/GetLogMVNPdf.hpp index f8d84a2..b01fcd2 100644 --- a/inst/include/GetLogMVNPdf.hpp +++ b/inst/include/GetLogMVNPdf.hpp @@ -1,9 +1,9 @@ -#ifndef _HivEstInfTime_GetLogMVNPdf_ -#define _HivEstInfTime_GetLogMVNPdf_ +#ifndef _hivEstInfTime_GetLogMVNPdf_ +#define _hivEstInfTime_GetLogMVNPdf_ #include "const.h" -namespace HivEstInfTime { +namespace hivEstInfTime { static double GetLogMVNPdf( const arma::dvec& x, @@ -27,4 +27,4 @@ static double GetLogMVNPdf( } // namespace -#endif // _HivEstInfTime_GetLogMVNPdf_ +#endif // _hivEstInfTime_GetLogMVNPdf_ diff --git a/inst/include/Lspline.hpp b/inst/include/Lspline.hpp index af37c19..b0a2833 100644 --- a/inst/include/Lspline.hpp +++ b/inst/include/Lspline.hpp @@ -1,7 +1,7 @@ #ifndef _HivEstInfTime_Lspline_ #define _HivEstInfTime_Lspline_ -namespace HivEstInfTime { +namespace hivEstInfTime { Rcpp::NumericVector Lspline( const Rcpp::NumericVector& x, @@ -24,4 +24,4 @@ Rcpp::NumericVector Lspline( } // namespace -#endif // _HivEstInfTime_Lspline_ +#endif // _hivEstInfTime_Lspline_ diff --git a/inst/include/MeanPostW.hpp b/inst/include/MeanPostW.hpp index 129fc41..c58ed08 100644 --- a/inst/include/MeanPostW.hpp +++ b/inst/include/MeanPostW.hpp @@ -1,5 +1,5 @@ -#ifndef _HivEstInfTime_MeanPostW_ -#define _HivEstInfTime_MeanPostW_ +#ifndef _hivEstInfTime_MeanPostW_ +#define _hivEstInfTime_MeanPostW_ #include "Lspline.hpp" #include "UpdateCD4DesignMatrix.hpp" @@ -7,7 +7,7 @@ #include "UpdateRandEffDesignMatrix.hpp" #include "GetLogMVNPdf.hpp" -namespace HivEstInfTime { +namespace hivEstInfTime { class MeanPostW: public Numer::Func { @@ -84,4 +84,4 @@ class MeanPostW: public Numer::Func } // namespace -#endif // _HivEstInfTime_MeanPostW_ +#endif // _hivEstInfTime_MeanPostW_ diff --git a/inst/include/PostW.hpp b/inst/include/PostW.hpp index 703a63c..f371a21 100644 --- a/inst/include/PostW.hpp +++ b/inst/include/PostW.hpp @@ -1,5 +1,5 @@ -#ifndef _HivEstInfTime_PostW_ -#define _HivEstInfTime_PostW_ +#ifndef _hivEstInfTime_PostW_ +#define _hivEstInfTime_PostW_ #include "Lspline.hpp" #include "UpdateCD4DesignMatrix.hpp" @@ -7,7 +7,7 @@ #include "UpdateRandEffDesignMatrix.hpp" #include "GetLogMVNPdf.hpp" -namespace HivEstInfTime { +namespace hivEstInfTime { class PostW: public Numer::Func { @@ -84,4 +84,4 @@ class PostW: public Numer::Func } // namespace -#endif // _HivEstInfTime_PostW_ +#endif // _hivEstInfTime_PostW_ diff --git a/inst/include/UpdateCD4DesignMatrix.hpp b/inst/include/UpdateCD4DesignMatrix.hpp index 99439ac..5cbe6f4 100644 --- a/inst/include/UpdateCD4DesignMatrix.hpp +++ b/inst/include/UpdateCD4DesignMatrix.hpp @@ -1,9 +1,9 @@ -#ifndef _HivEstInfTime_UpdateCD4DesignMatrix_ -#define _HivEstInfTime_UpdateCD4DesignMatrix_ +#ifndef _hivEstInfTime_UpdateCD4DesignMatrix_ +#define _hivEstInfTime_UpdateCD4DesignMatrix_ #include "const.h" -namespace HivEstInfTime { +namespace hivEstInfTime { arma::dmat UpdateCD4DesignMatrix( const Rcpp::List& baseDM, @@ -45,4 +45,4 @@ arma::dmat UpdateCD4DesignMatrix( } // namespace -#endif // _HivEstInfTime_UpdateCD4DesignMatrix_ +#endif // _hivEstInfTime_UpdateCD4DesignMatrix_ diff --git a/inst/include/UpdateRandEffDesignMatrix.hpp b/inst/include/UpdateRandEffDesignMatrix.hpp index 622ff0d..de89ca5 100644 --- a/inst/include/UpdateRandEffDesignMatrix.hpp +++ b/inst/include/UpdateRandEffDesignMatrix.hpp @@ -1,7 +1,7 @@ -#ifndef _HivEstInfTime_UpdateRandEffDesignMatrix_ -#define _HivEstInfTime_UpdateRandEffDesignMatrix_ +#ifndef _hivEstInfTime_UpdateRandEffDesignMatrix_ +#define _hivEstInfTime_UpdateRandEffDesignMatrix_ -namespace HivEstInfTime { +namespace hivEstInfTime { arma::dmat UpdateRandEffDesignMatrix( const Rcpp::List& baseDM, @@ -31,4 +31,4 @@ arma::dmat UpdateRandEffDesignMatrix( } // namespace -#endif // _HivEstInfTime_UpdateRandEffDesignMatrix_ +#endif // _hivEstInfTime_UpdateRandEffDesignMatrix_ diff --git a/inst/include/UpdateVLDesignMatrix.hpp b/inst/include/UpdateVLDesignMatrix.hpp index b85ee51..55b45a3 100644 --- a/inst/include/UpdateVLDesignMatrix.hpp +++ b/inst/include/UpdateVLDesignMatrix.hpp @@ -1,9 +1,9 @@ -#ifndef _HivEstInfTime_UpdateVLDesignMatrix_ -#define _HivEstInfTime_UpdateVLDesignMatrix_ +#ifndef _hivEstInfTime_UpdateVLDesignMatrix_ +#define _hivEstInfTime_UpdateVLDesignMatrix_ #include "const.h" -namespace HivEstInfTime { +namespace hivEstInfTime { arma::dmat UpdateVLDesignMatrix( const Rcpp::List& baseDM, @@ -54,4 +54,4 @@ arma::dmat UpdateVLDesignMatrix( } // namespace -#endif // _HivEstInfTime_UpdateVLDesignMatrix_ +#endif // _hivEstInfTime_UpdateVLDesignMatrix_ diff --git a/man/HivEstInfTime.Rd b/man/HivEstInfTime.Rd index d905f10..8d58c24 100644 --- a/man/HivEstInfTime.Rd +++ b/man/HivEstInfTime.Rd @@ -1,9 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/HivEstInfTime-package.R +% Please edit documentation in R/hivEstInfTime-package.R \docType{package} -\name{HivEstInfTime} -\alias{HivEstInfTime-package} -\alias{HivEstInfTime} +\name{hivEstInfTime} +\alias{hivEstInfTime-package} +\alias{hivEstInfTime} \title{HIV Infection Time Estimation} \description{ Estimate HIV infection time diff --git a/misc/Playground.R b/misc/Playground.R index 432d457..9623a48 100644 --- a/misc/Playground.R +++ b/misc/Playground.R @@ -56,7 +56,7 @@ med_postWcd4 <- function(M) { integrate(VpostWcd4, lower = 0, upper = M)$value / res1$value - 0.5 } med_postWcd4_2 <- function(M) { - HivEstInfTime:::IntegratePostW( + hivEstInfTime:::IntegratePostW( lower = 0, upper = M, y = y, @@ -140,7 +140,7 @@ for (i in 1:G) { if (only[[i]][1] == "CD4 only") { res1 <- try(integrate(VpostWcd4, lower = 0, upper = uptime), silent = TRUE) - res1Mine <- try(HivEstInfTime:::IntegratePostW( + res1Mine <- try(hivEstInfTime:::IntegratePostW( lower = 0, upper = uptime, y = y, diff --git a/misc/Test.R b/misc/Test.R index 35a7750..de5d0b0 100644 --- a/misc/Test.R +++ b/misc/Test.R @@ -1,7 +1,7 @@ library(data.table) # Migration ---------------------------------------------------------------------------------------- -params <- HivEstInfTime::GetMigrantParams() +params <- hivEstInfTime::GetMigrantParams() # Recon data set reconAIDS <- data.table::setDT(haven::read_dta('D:/VirtualBox_Shared/Migrant_test/baseAIDS.dta')) @@ -51,8 +51,8 @@ input <- list( ) # Create test dataset -test <- HivEstInfTime::PredictInf(input, params) -test <- HivEstInfTime::PredictInf(input, params, percentiles = c(0.025, 0.5, 0.975)) +test <- hivEstInfTime::PredictInf(input, params) +test <- hivEstInfTime::PredictInf(input, params, percentiles = c(0.025, 0.5, 0.975)) # Reconcile recon <- rbind( diff --git a/src/RcppExports.cpp b/src/RcppExports.cpp index 6a9f7e3..f436d8b 100644 --- a/src/RcppExports.cpp +++ b/src/RcppExports.cpp @@ -14,7 +14,7 @@ Rcpp::Rostream& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get(); // Lspline Rcpp::NumericVector Lspline(const Rcpp::NumericVector& x, const Rcpp::NumericVector& knots); -RcppExport SEXP _HivEstInfTime_Lspline(SEXP xSEXP, SEXP knotsSEXP) { +RcppExport SEXP _hivEstInfTime_Lspline(SEXP xSEXP, SEXP knotsSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::RNGScope rcpp_rngScope_gen; @@ -26,7 +26,7 @@ END_RCPP } // GetLogMVNPdf double GetLogMVNPdf(const arma::dvec& x, const arma::dvec& mu, const arma::dmat& sigma); -RcppExport SEXP _HivEstInfTime_GetLogMVNPdf(SEXP xSEXP, SEXP muSEXP, SEXP sigmaSEXP) { +RcppExport SEXP _hivEstInfTime_GetLogMVNPdf(SEXP xSEXP, SEXP muSEXP, SEXP sigmaSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::RNGScope rcpp_rngScope_gen; @@ -39,7 +39,7 @@ END_RCPP } // PostW double PostW(const double& w, const arma::dvec& y, const arma::dmat& xAIDS, const double& maxDTime, const arma::dmat& betaAIDS, const double& kappa, const arma::dmat& bFE, const arma::dmat& varCovRE, const Rcpp::List& baseCD4DM, const Rcpp::DataFrame& fxCD4Data, const Rcpp::List& baseVLDM, const Rcpp::DataFrame& fxVLData, const Rcpp::List& baseRandEffDM, const Rcpp::DataFrame& fzData, const arma::dmat& err); -RcppExport SEXP _HivEstInfTime_PostW(SEXP wSEXP, SEXP ySEXP, SEXP xAIDSSEXP, SEXP maxDTimeSEXP, SEXP betaAIDSSEXP, SEXP kappaSEXP, SEXP bFESEXP, SEXP varCovRESEXP, SEXP baseCD4DMSEXP, SEXP fxCD4DataSEXP, SEXP baseVLDMSEXP, SEXP fxVLDataSEXP, SEXP baseRandEffDMSEXP, SEXP fzDataSEXP, SEXP errSEXP) { +RcppExport SEXP _hivEstInfTime_PostW(SEXP wSEXP, SEXP ySEXP, SEXP xAIDSSEXP, SEXP maxDTimeSEXP, SEXP betaAIDSSEXP, SEXP kappaSEXP, SEXP bFESEXP, SEXP varCovRESEXP, SEXP baseCD4DMSEXP, SEXP fxCD4DataSEXP, SEXP baseVLDMSEXP, SEXP fxVLDataSEXP, SEXP baseRandEffDMSEXP, SEXP fzDataSEXP, SEXP errSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::RNGScope rcpp_rngScope_gen; @@ -64,7 +64,7 @@ END_RCPP } // VPostW Rcpp::NumericVector VPostW(const arma::dvec& w, const arma::dvec& y, const arma::dmat& xAIDS, const double& maxDTime, const arma::dmat& betaAIDS, const double& kappa, const arma::dmat& bFE, const arma::dmat& varCovRE, const Rcpp::List& baseCD4DM, const Rcpp::DataFrame& fxCD4Data, const Rcpp::List& baseVLDM, const Rcpp::DataFrame& fxVLData, const Rcpp::List& baseRandEffDM, const Rcpp::DataFrame& fzData, const arma::dmat& err); -RcppExport SEXP _HivEstInfTime_VPostW(SEXP wSEXP, SEXP ySEXP, SEXP xAIDSSEXP, SEXP maxDTimeSEXP, SEXP betaAIDSSEXP, SEXP kappaSEXP, SEXP bFESEXP, SEXP varCovRESEXP, SEXP baseCD4DMSEXP, SEXP fxCD4DataSEXP, SEXP baseVLDMSEXP, SEXP fxVLDataSEXP, SEXP baseRandEffDMSEXP, SEXP fzDataSEXP, SEXP errSEXP) { +RcppExport SEXP _hivEstInfTime_VPostW(SEXP wSEXP, SEXP ySEXP, SEXP xAIDSSEXP, SEXP maxDTimeSEXP, SEXP betaAIDSSEXP, SEXP kappaSEXP, SEXP bFESEXP, SEXP varCovRESEXP, SEXP baseCD4DMSEXP, SEXP fxCD4DataSEXP, SEXP baseVLDMSEXP, SEXP fxVLDataSEXP, SEXP baseRandEffDMSEXP, SEXP fzDataSEXP, SEXP errSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::RNGScope rcpp_rngScope_gen; @@ -89,7 +89,7 @@ END_RCPP } // IntegratePostW Rcpp::List IntegratePostW(const double& lower, const double& upper, const arma::dvec& y, const arma::dmat& xAIDS, const double& maxDTime, const arma::dmat& betaAIDS, const double& kappa, const arma::dmat& bFE, const arma::dmat& varCovRE, const Rcpp::List& baseCD4DM, const Rcpp::DataFrame& fxCD4Data, const Rcpp::List& baseVLDM, const Rcpp::DataFrame& fxVLData, const Rcpp::List& baseRandEffDM, const Rcpp::DataFrame& fzData, const arma::dmat& err); -RcppExport SEXP _HivEstInfTime_IntegratePostW(SEXP lowerSEXP, SEXP upperSEXP, SEXP ySEXP, SEXP xAIDSSEXP, SEXP maxDTimeSEXP, SEXP betaAIDSSEXP, SEXP kappaSEXP, SEXP bFESEXP, SEXP varCovRESEXP, SEXP baseCD4DMSEXP, SEXP fxCD4DataSEXP, SEXP baseVLDMSEXP, SEXP fxVLDataSEXP, SEXP baseRandEffDMSEXP, SEXP fzDataSEXP, SEXP errSEXP) { +RcppExport SEXP _hivEstInfTime_IntegratePostW(SEXP lowerSEXP, SEXP upperSEXP, SEXP ySEXP, SEXP xAIDSSEXP, SEXP maxDTimeSEXP, SEXP betaAIDSSEXP, SEXP kappaSEXP, SEXP bFESEXP, SEXP varCovRESEXP, SEXP baseCD4DMSEXP, SEXP fxCD4DataSEXP, SEXP baseVLDMSEXP, SEXP fxVLDataSEXP, SEXP baseRandEffDMSEXP, SEXP fzDataSEXP, SEXP errSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::RNGScope rcpp_rngScope_gen; @@ -115,7 +115,7 @@ END_RCPP } // IntegrateMeanPostW Rcpp::List IntegrateMeanPostW(const double& lower, const double& upper, const arma::dvec& y, const arma::dmat& xAIDS, const double& maxDTime, const arma::dmat& betaAIDS, const double& kappa, const arma::dmat& bFE, const arma::dmat& varCovRE, const Rcpp::List& baseCD4DM, const Rcpp::DataFrame& fxCD4Data, const Rcpp::List& baseVLDM, const Rcpp::DataFrame& fxVLData, const Rcpp::List& baseRandEffDM, const Rcpp::DataFrame& fzData, const arma::dmat& err); -RcppExport SEXP _HivEstInfTime_IntegrateMeanPostW(SEXP lowerSEXP, SEXP upperSEXP, SEXP ySEXP, SEXP xAIDSSEXP, SEXP maxDTimeSEXP, SEXP betaAIDSSEXP, SEXP kappaSEXP, SEXP bFESEXP, SEXP varCovRESEXP, SEXP baseCD4DMSEXP, SEXP fxCD4DataSEXP, SEXP baseVLDMSEXP, SEXP fxVLDataSEXP, SEXP baseRandEffDMSEXP, SEXP fzDataSEXP, SEXP errSEXP) { +RcppExport SEXP _hivEstInfTime_IntegrateMeanPostW(SEXP lowerSEXP, SEXP upperSEXP, SEXP ySEXP, SEXP xAIDSSEXP, SEXP maxDTimeSEXP, SEXP betaAIDSSEXP, SEXP kappaSEXP, SEXP bFESEXP, SEXP varCovRESEXP, SEXP baseCD4DMSEXP, SEXP fxCD4DataSEXP, SEXP baseVLDMSEXP, SEXP fxVLDataSEXP, SEXP baseRandEffDMSEXP, SEXP fzDataSEXP, SEXP errSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::RNGScope rcpp_rngScope_gen; @@ -141,16 +141,16 @@ END_RCPP } static const R_CallMethodDef CallEntries[] = { - {"_HivEstInfTime_Lspline", (DL_FUNC) &_HivEstInfTime_Lspline, 2}, - {"_HivEstInfTime_GetLogMVNPdf", (DL_FUNC) &_HivEstInfTime_GetLogMVNPdf, 3}, - {"_HivEstInfTime_PostW", (DL_FUNC) &_HivEstInfTime_PostW, 15}, - {"_HivEstInfTime_VPostW", (DL_FUNC) &_HivEstInfTime_VPostW, 15}, - {"_HivEstInfTime_IntegratePostW", (DL_FUNC) &_HivEstInfTime_IntegratePostW, 16}, - {"_HivEstInfTime_IntegrateMeanPostW", (DL_FUNC) &_HivEstInfTime_IntegrateMeanPostW, 16}, + {"_hivEstInfTime_Lspline", (DL_FUNC) &_hivEstInfTime_Lspline, 2}, + {"_hivEstInfTime_GetLogMVNPdf", (DL_FUNC) &_hivEstInfTime_GetLogMVNPdf, 3}, + {"_hivEstInfTime_PostW", (DL_FUNC) &_hivEstInfTime_PostW, 15}, + {"_hivEstInfTime_VPostW", (DL_FUNC) &_hivEstInfTime_VPostW, 15}, + {"_hivEstInfTime_IntegratePostW", (DL_FUNC) &_hivEstInfTime_IntegratePostW, 16}, + {"_hivEstInfTime_IntegrateMeanPostW", (DL_FUNC) &_hivEstInfTime_IntegrateMeanPostW, 16}, {NULL, NULL, 0} }; -RcppExport void R_init_HivEstInfTime(DllInfo *dll) { +RcppExport void R_init_hivEstInfTime(DllInfo *dll) { R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); R_useDynamicSymbols(dll, FALSE); } diff --git a/src/exports.cpp b/src/exports.cpp index c2b2b64..aa54598 100644 --- a/src/exports.cpp +++ b/src/exports.cpp @@ -5,7 +5,7 @@ Rcpp::NumericVector Lspline( const Rcpp::NumericVector& x, const Rcpp::NumericVector& knots ) { - return HivEstInfTime::Lspline(x, knots); + return hivEstInfTime::Lspline(x, knots); }; @@ -15,7 +15,7 @@ double GetLogMVNPdf( const arma::dvec& mu, const arma::dmat& sigma ) { - return HivEstInfTime::GetLogMVNPdf(x, mu, sigma); + return hivEstInfTime::GetLogMVNPdf(x, mu, sigma); }; // [[Rcpp::export]] @@ -36,7 +36,7 @@ double PostW( const Rcpp::DataFrame& fzData, const arma::dmat& err ) { - HivEstInfTime::PostW f( + hivEstInfTime::PostW f( y, xAIDS, maxDTime, betaAIDS, kappa, bFE, varCovRE, baseCD4DM, fxCD4Data, baseVLDM, fxVLData, baseRandEffDM, fzData, err ); @@ -62,7 +62,7 @@ Rcpp::NumericVector VPostW( const Rcpp::DataFrame& fzData, const arma::dmat& err ) { - HivEstInfTime::PostW f( + hivEstInfTime::PostW f( y, xAIDS, maxDTime, betaAIDS, kappa, bFE, varCovRE, baseCD4DM, fxCD4Data, baseVLDM, fxVLData, baseRandEffDM, fzData, err ); @@ -95,7 +95,7 @@ Rcpp::List IntegratePostW( const Rcpp::DataFrame& fzData, const arma::dmat& err ) { - HivEstInfTime::PostW f( + hivEstInfTime::PostW f( y, xAIDS, maxDTime, betaAIDS, kappa, bFE, varCovRE, baseCD4DM, fxCD4Data, baseVLDM, fxVLData, baseRandEffDM, fzData, err ); @@ -140,7 +140,7 @@ Rcpp::List IntegrateMeanPostW( const Rcpp::DataFrame& fzData, const arma::dmat& err ) { - HivEstInfTime::MeanPostW f( + hivEstInfTime::MeanPostW f( y, xAIDS, maxDTime, betaAIDS, kappa, bFE, varCovRE, baseCD4DM, fxCD4Data, baseVLDM, fxVLData, baseRandEffDM, fzData, err ); diff --git a/utils/Update local dependencies.R b/utils/Update local dependencies.R index e626cb4..7ed6912 100644 --- a/utils/Update local dependencies.R +++ b/utils/Update local dependencies.R @@ -1,2 +1,4 @@ # 1. Update local packages ------------------------------------------------------------------------- +dir.create('library', showWarnings = FALSE) +.libPaths('./library') pak::local_install_deps(root = '.', dependencies = 'hard', upgrade = TRUE)