diff --git a/NEWS.md b/NEWS.md index f888f82b5..e5da1e343 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # rxode2 (development version) +- Add `getRxNpars` to api. This allows the development version of + `babelmixr2` to better check what model is loaded and unload/reload + as necessary. + # rxode2 3.0.2 - Bug fix for `api`, the censoring function pointer has been updated diff --git a/src/init.c b/src/init.c index 13982a808..ac12333ff 100644 --- a/src/init.c +++ b/src/init.c @@ -419,6 +419,8 @@ SEXP _rxode2_rxode2Ptr(void) { SEXP rxode2getRxNobs = PROTECT(R_MakeExternalPtrFn((DL_FUNC)&getRxNobs, R_NilValue, R_NilValue)); pro++; SEXP rxode2getRxNobs2 = PROTECT(R_MakeExternalPtrFn((DL_FUNC)&getRxNobs2, R_NilValue, R_NilValue)); pro++; SEXP rxode2getOpIndSolve = PROTECT(R_MakeExternalPtrFn((DL_FUNC)&getOpIndSolve, R_NilValue, R_NilValue)); pro++; + SEXP rxode2getRxNpars = PROTECT(R_MakeExternalPtrFn((DL_FUNC)&getRxNpars, + R_NilValue, R_NilValue)); pro++; #define nVec 49 @@ -472,7 +474,7 @@ SEXP _rxode2_rxode2Ptr(void) { SET_VECTOR_ELT(ret, 45, rxode2getRxNobs); SET_VECTOR_ELT(ret, 46, rxode2getRxNobs2); SET_VECTOR_ELT(ret, 47, rxode2getOpIndSolve); - SET_VECTOR_ELT(ret, 48, getRxNpars); + SET_VECTOR_ELT(ret, 48, rxode2getRxNpars); SEXP retN = PROTECT(Rf_allocVector(STRSXP, nVec)); pro++; SET_STRING_ELT(retN, 0, Rf_mkChar("rxode2rxRmvnSEXP")); @@ -523,8 +525,7 @@ SEXP _rxode2_rxode2Ptr(void) { SET_STRING_ELT(retN, 45, Rf_mkChar("rxode2getRxNobs")); SET_STRING_ELT(retN, 46, Rf_mkChar("rxode2getRxNobs2")); SET_STRING_ELT(retN, 47, Rf_mkChar("rxode2getOpIndSolve")); - SET_VECTOR_ELT(retN, 48, Rf_mkChar("rxode2getRxNpars")); - + SET_STRING_ELT(retN, 48, Rf_mkChar("rxode2getRxNpars")); #undef nVec // Set the names attribute of the list