Package: rxode2 3.0.2

Matthew L. Fidler

rxode2: Facilities for Simulating from ODE-Based Models

Facilities for running simulations from ordinary differential equation ('ODE') models, such as pharmacometrics and other compartmental models. A compilation manager translates the ODE model into C, compiles it, and dynamically loads the object code into R for improved computational efficiency. An event table object facilitates the specification of complex dosing regimens (optional) and sampling schedules. NB: The use of this package requires both C and Fortran compilers, for details on their use with R please see Section 6.3, Appendix A, and Appendix D in the "R Administration and Installation" manual. Also the code is mostly released under GPL. The 'VODE' and 'LSODA' are in the public domain. The information is available in the inst/COPYRIGHTS.

Authors:Matthew L. Fidler [aut, cre], Wenping Wang [aut], Alan Hindmarsh [ctb], Arun Srinivasan [ctb], Awad H. Al-Mohy [ctb], Bill Denney [ctb], Cleve Moler [ctb], David Cooley [ctb], Drew Schmidt [ctb], Ernst Hairer [ctb], Gabriel Staples [ctb], Gerhard Wanner [ctb], Gilbert Stewart [ctb], Goro Fuji [ctb], Hadley Wickham [ctb], Igor Kushnir [ctb], Jack Dongarra [ctb], Jim Bunch [ctb], Kevin Ushey [ctb], Linda Petzold [ctb], Martin Maechler [ctb], Matt Dowle [ctb], Matteo Fasiolo [ctb], Melissa Hallow [aut], Michel Lang [ctb], Morwenn [ctb], Nicholas J. Higham [ctb], Omar Elashkar [ctb], Richard Upton [ctb], Roger B. Sidje [ctb], Simon Frost [ctb], Yu Feng [ctb], Zufar Mulyukov [ctb]

rxode2_3.0.2.tar.gz
rxode2_3.0.2.tar.gz(r-4.5-noble)rxode2_3.0.2.tar.gz(r-4.4-noble)
rxode2_2.1.3.tgz(r-4.4-emscripten)rxode2_2.1.3.tgz(r-4.3-emscripten)
rxode2.pdf |rxode2.html
rxode2/json (API)
NEWS

# Install 'rxode2' in R:
install.packages('rxode2', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/nlmixr2/rxode2/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:

6.71 score 1 stars 11 packages 198 scripts 2.6k downloads 391 exports 56 dependencies

Last updated 29 days agofrom:6474722594. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKOct 31 2024
R-4.5-linux-x86_64OKOct 31 2024

Exports:.assertRenameErrorModelLine.cbindOme.clearPipe.collectWarnings.convertId.copyUi.expandPars.extraC.extraCnow.getLastIdLvl.getWh.handleSingleErrTypeNormOrTFoceiBase.iniGetAppendArg.iniHandleFixOrUnfix.iniHandleLine.linCmtSensB.malert.matchesLangTemplate.minfo.modelHandleModelLines.msuccess.mwarn.pipeDfObs.pipeDfSub.pipeEvents.pipeInits.pipeKeep.pipeNStud.pipeNSub.pipeOmega.pipeParams.pipeRx.pipeSigma.pipeThetaMat.quoteCallInfoLines.rxBlankIni.rxC.rxDocTable.rxFromSE.rxGetHiBoundaryPred1AndIni.rxGetLambdaFromPred1AndIni.rxGetLowBoundaryPred1AndIni.rxGetPredictionDVTransform.rxGetPredictionF.rxGetPredictionFTransform.rxGetVarianceForErrorType.rxIsLinCmt.rxJacobian.rxLinCmtGen.rxode2ptrs.rxPrune.rxRename.rxSEeqUsr.rxSens.rxToSE.rxTransform.rxTransInfo.rxWithOptions.rxWithSink.rxWithSinkBoth.rxWithWd.s3register.symengineFs.toClassicEvid.udfCallFunArg.udfEnvReset.udfEnvSet.udfEnvSetUdf.udfExists.udfMd5Info.useUtf.vecDf%>%add.dosingadd.samplingaesas.etas.inias.modelas.rxEvidas.rxRateDuras.rxUiassertCompartmentExistsassertCompartmentNameassertCompartmentNewassertExistsassertIniDfassertParameterValueassertRxLinCmtassertRxUiassertRxUiEstimatedResidualsassertRxUiMixedOnlyassertRxUiMuRefOnlyassertRxUiNormalassertRxUiPopulationOnlyassertRxUiPredictionassertRxUiRandomOnIdOnlyassertRxUiSingleEndpointassertRxUiTransformNormalassertRxUnboundedassertVariableExistsassertVariableNameassertVariableNewbinomProbsboxCoxboxCoxInvcvPostdfWisharterfetetExpandetRbindetRepetSeqetTranseventTableexpand_limitsexpitfacet_wrapfindLhsforderForceBasegammapgammapDergammapInvgammapInvagammaqgammaqInvgammaqInvagenShinyApp.templategeom_amtgeom_censgeom_linegetBaseIniSimModelgetBaseSimModelgetBaseSymengineModelgetRxThreadsggplotguide_noneiniini<-invWR1dis.rxEtis.rxSolveis.rxStackDatalabel_bothlabel_contextlabel_valuelabel_wrap_genlinModlinMod0linModA0linModBlinModB0linModDlinModD0linModMlinModM0llikBetallikBinomllikCauchyllikChisqllikExpllikFllikGammallikGeomllikNbinomllikNbinomMullikNormllikPoisllikTllikUnifllikWeibulllogitlogitNormInfolotrilowergammameanProbsmodelmodel<-modelExtractodeMethodToIntphiprobitprobitInvprobitNormInforinvchisqrLKJ1rxAllowUnloadrxAppendModelrxAssignControlValuerxAssignPtrrxbetarxbinomrxBlockZerosrxCrxCatrxcauchyrxCbindStudyIndividualrxChainrxChain2rxchisqrxCleanrxCombineErrorLinesrxCompilerxConditionrxControlrxControlUpdateSensrxCoresrxCreateCacherxDrxDeleterxDemoteAddErrrxDerivedrxDfdyrxDllrxDllLoadedrxDynLoadrxDynUnloadrxErrTypeCombinerxEtDispatchSolverxEvidrxexprxExpandFEta_rxExpandGridrxExpandGrid_rxExpandIfElserxExpandSens_rxExpandSens2_rxfrxFixPoprxForgetrxFromSErxFunrxFunParserxgammarxgeomrxGetControlrxGetDistributionSimulationLinesrxGetLinrxGetModelrxGetrxode2rxGetSeedrxHtmlrxIndLinStaterxIndLinStrategyrxInitrxInitsrxIntToBaserxIntToLetterrxInvrxIsrxIsCurrentrxIsLoadedrxLhsrxLoadrxLockrxMd5rxModels_rxModelVarsrxModelVarsS3rxnbinomrxnbinomMurxnormrxNormrxnormVrxodeRxODErxode<-RxODE<-rxode2rxode2<-rxode2parserxode2parseAssignPackagesToLoadrxode2parseAssignPointerTranslationrxode2parseAssignTranslationrxode2parseDrxode2parseGetPackagesToLoadrxode2parseGetPointerAssignmentrxode2parseGetTranslationrxOptExprrxordrxParamrxParamsrxParseErrrxParsePkrxParsePredrxParseSetSilentErrrxParseSuppressMsgrxPkgrxpoisrxPprxPreferredDistributionNamerxProgressrxProgressAbortrxProgressStoprxPrunerxRateDurrxReloadrxRemoveControlrxRenamerxRepR0_rxReqrxRmFunrxRmFunParserxRmvnrxSrxSeedEngrxSetControlrxSetCovariateNamesForPipingrxSetIni0rxSetPipingAutorxSetProdrxSetProgressBarrxSetSeedrxSetSilentErrrxSetSumrxSetupInirxSetupScalerxShinyrxSimThetaOmegarxSolverxSolveFreerxSolveSetuprxSplitPlusQrxStackrxStaterxSumProdModelrxSupportedFunsrxSuppressMsgrxSymInvCholrxSymInvCholCreaterxSymInvCholNrxSyncOptionsrxtrxTempDirrxTestrxThemerxTickrxToSErxTransrxUdfUirxUdfUiDatarxUdfUiEstrxUdfUiIniDfrxUdfUiIniLhsrxUdfUiMvrxUdfUiNumrxUdfUiParsingrxUdfUiResetrxUiCompressrxUiDecompressrxUiDeparserxUiGetrxunifrxUnloadrxUnloadAllrxUnlockrxUserxValidaterxVersionrxweibullrxWithPreserveSeedrxWithSeedscale_typescale_x_continuousscale_x_datescale_x_discretescale_y_continuousscale_y_datescale_y_discretesetRxThreadsstat_amtstat_censswapMatListWithCubetestCompartmentExiststestExiststestIniDftestRxLinCmttestRxUnboundedtestVariableExiststoTrialDurationuppergammawaiverwarnRxBoundedwrite.template.serverwrite.template.uixlabyeoJohnsonyeoJohnsonInvylabzeroRe

Dependencies:backportsBHcachemcheckmateclicolorspacecpp11cpp11armadillocrayondata.tabledigestdparserfansifarverfastmapggplot2gluegtableinlineisobandlabelinglatticelazyevallifecyclelotrimagrittrMASSMatrixmemoisemgcvmunsellnlmepillarpkgconfigPreciseSumsqsR6RApiSerializeRColorBrewerRcppRcppArmadilloRcppEigenRcppParallelrexrlangrxode2llscalessitmoStanHeadersstringfishsystibbleutf8vctrsviridisLitewithr

rxode2 ODE solving syntax

Rendered fromrxode2-syntax.Rmdusingknitr::rmarkdown_notangleon Oct 31 2024.

Last update: 2024-09-23
Started: 2022-05-09

Readme and manuals

Help Manual

Help pageTopics
cbind Ome.cbindOme
Collect warnings and just warn once..collectWarnings
This copies the rxode2 UI object so it can be modified.copyUi
Handle the single error for normal or t distributions.handleSingleErrTypeNormOrTFoceiBase
Check if a language object matches a template language object.matchesLangTemplate
Handle model lines.modelHandleModelLines
Returns quoted call information.quoteCallInfoLines
Internal function to generate the model variables for a linCmt() model.rxLinCmtGen
Get the rxode2 function pointers.rxode2ptrs
Temporarily set options then restore them while running code.rxWithOptions
Temporarily set options then restore them while running code.rxWithWd
This converts NONMEM-style EVIDs to classic RxODE events.toClassicEvid
Convert numeric vector to repeated data.frame.vecDf
Add dosing to eventTableadd.dosing
Add sampling to eventTableadd.sampling
Coerce object to data.frameas.et as.et.default
Turn into an ini block for initializationas.ini as.ini.call as.ini.character as.ini.data.frame as.ini.default as.ini.lotriFix as.ini.matrix
Turn into a model expressionas.model as.model.call as.model.character as.model.default as.model.list
As rxode2 uias.rxUi as.rxUi.default as.rxUi.function as.rxUi.rxModelVars as.rxUi.rxode2 as.rxUi.rxode2tos as.rxUi.rxUi
Verify that the compartment exists in a modelassertCompartmentExists testCompartmentExists
Verify that a value is a valid nlmixr2 compartment nameassertCompartmentName assertExists assertParameterValue assertVariableName testExists
Verify that a compartment would be new to the modelassertCompartmentNew
Assert properties of the rxUi modelsassertRxUi assertRxUiEstimatedResiduals assertRxUiMixedOnly assertRxUiMuRefOnly assertRxUiNormal assertRxUiPopulationOnly assertRxUiPrediction assertRxUiRandomOnIdOnly assertRxUiSingleEndpoint assertRxUiTransformNormal
Assert a variable exists in the modelassertVariableExists testVariableExists
Assert a variable would be new to the modelassertVariableNew
Calculate expected confidence bands with binomial sampling distributionbinomProbs binomProbs.default
boxCox/yeoJohnson and inverse boxCox/yeoJohnson functionsboxCox boxCoxInv yeoJohnson yeoJohnsonInv
Sample a covariance Matrix from the Posterior Inverse Wishart distribution.cvPost
This uses simulations to match the rsedfWishart
Error functionerf
Event Table Functionet et.default et.function et.rxode2 et.rxParams et.rxSolve et.rxUi
Expand additional dosesetExpand
Combining event tablesetRbind rbind.rxEt
Repeat an rxode2 event tableetRep rep.rxEt
Sequence of event tablesetSeq seq.rxEt
Create an event table objecteventTable
Gammap: normalized lower incomplete gamma functiongammap
gammapDer: derivative of gammapgammapDer
gammapInv and gammapInva: Inverses of normalized gammap functiongammapInv gammapInva
Gammaq: normalized upper incomplete gamma functiongammaq
gammaqInv and gammaqInva: Inverses of normalized gammaq functiongammaqInv gammaqInva
Generate an example (template) of a dosing regimen shiny appgenShinyApp.template write.template.server write.template.ui
Get/Set the number of threads that rxode2 usesgetRxThreads rxCores setRxThreads
Ini block for rxode2/nlmixr modelsini ini.default ini.rxUi
Assign the ini block in the rxode2 related objectini<-
Return if the object can be stackedis.rxStackData
Linear model to replace in rxode2 ui modellinMod linMod0 linModA linModA0 linModB linModB0 linModD linModD0 linModM linModM0
Calculate the log likelihood of the binomial function (and its derivatives)llikBeta
Calculate the log likelihood of the binomial function (and its derivatives)llikBinom
log likelihood of Cauchy distribution and it's derivatives (from stan)llikCauchy
log likelihood and derivatives for chi-squared distributionllikChisq
log likelihood and derivatives for exponential distributionllikExp
log likelihood and derivatives for F distributionllikF
log likelihood and derivatives for Gamma distributionllikGamma
log likelihood and derivatives for Geom distributionllikGeom
Calculate the log likelihood of the negative binomial function (and its derivatives)llikNbinom
Calculate the log likelihood of the negative binomial function (and its derivatives)llikNbinomMu
Log likelihood for normal distributionllikNorm
log-likelihood for the Poisson distributionllikPois
Log likelihood of T and it's derivatives (from stan)llikT
log likelihood and derivatives for Unif distributionllikUnif
log likelihood and derivatives for Weibull distributionllikWeibull
logit and inverse logit (expit) functionsexpit logit logitNormInfo probitNormInfo
lowergamma: upper incomplete gamma functionlowergamma
Calculate expected confidence bands or prediction intreval with normal or t sampling distributionmeanProbs meanProbs.default
Model block for rxode2/nlmixr modelsmodel model.default model.function model.rxModelVars model.rxode2 model.rxUi
Assign the model block in the rxode2 related objectmodel<-
Extract model lines from a rxui modelmodelExtract modelExtract.default modelExtract.function modelExtract.rxModelVars modelExtract.rxode2 modelExtract.rxUi
Conversion between character and integer ODE integration methods for rxode2odeMethodToInt
Cumulative distribution of standard normalphi
Plot rxode2 objectsplot.rxSolve plot.rxSolveConfint1 plot.rxSolveConfint2
Print Valuesprint.rxModelVars
probit and inverse probit functionsprobit probitInv
Scaled Inverse Chi Squared distributionrinvchisq
Allow unloading of dllsrxAllowUnload
Append two rxui models togetherrxAppendModel
Assign Control VariablerxAssignControlValue
Assign pointer based on model variablesrxAssignPtr
Simulate beta variable from threefry generatorrxbeta
Simulate Binomial variable from threefry generatorrxbinom
Simulate Cauchy variable from threefry generatorrxcauchy
Bind the study parameters and individual parametersrxCbindStudyIndividual
Simulate chi-squared variable from threefry generatorrxchisq
Cleanup anonymous DLLs by unloading themrxClean
Compile a model if neededrxCompile rxCompile.character rxCompile.rxDll rxCompile.rxModelVars rxCompile.rxode2
This updates the tolerances based on the sensitivity equationsrxControlUpdateSens
This will create the cache directory for rxode2 to save between sessionsrxCreateCache
Add to rxode2's derivative tablesrxD
Delete the DLL for the modelrxDelete
Calculate derived parameters for the 1-, 2-, and 3- compartment linear models.rxDerived
Jacobian and parameter derivativesrxDfdy
Dispatch solve to 'rxode2' solverxEtDispatchSolve rxEtDispatchSolve.default
EVID formatting for tibble and other places.as.character.rxEvid as.rxEvid c.rxEvid c.rxRateDur format.rxEvid format.rxRateDur print.rxEvid rxEvid units<-.rxEvid [.rxEvid [[.rxEvid
Simulate exponential variable from threefry generatorrxexp
Simulate F variable from threefry generatorrxf
Apply the fixed population estimated parametersrxFixPop
Add/Create C functions for use in rxode2rxFun rxRmFun
Simulate gamma variable from threefry generatorrxgamma
Simulate geometric variable from threefry generatorrxgeom
rxGetControl option from uirxGetControl
Get the linear compartment model true functionrxGetLin
Get rxode2 model from objectrxGetrxode2
Get the rxode2 seedrxGetSeed
Format rxSolve and related objects as html.rxHtml rxHtml.rxSolve
Set the preferred factoring by staterxIndLinState
This sets the inductive linearization strategy for matrix buildingrxIndLinStrategy
Convert a positive baserxIntToBase
Convert a positive integer to a letter seriesrxIntToLetter
Invert matrix using RcppArmadillo.rxInv
Checks if the rxode2 object was built with the current buildrxIsCurrent
Left handed VariablesrxLhs
Lock/unlocking of rxode2 dll filerxLock rxUnlock
Simulate Binomial variable from threefry generatorrxnbinom rxnbinomMu
Get the normalized modelrxNorm
Simulate random normal variable from threefry generatorrxnorm rxnormV
Create an ODE-based model specificationRxODE rxode rxode2
Set the function body of an rxUi object while retaining other object information (like data)rxode2<- rxode2<-.default rxode2<-.function RxODE<- rxode<-
Internal translation to get model variables listrxode2parse
This assigns the c level linkages for a roxde2 modelrxode2parseAssignTranslation
This gives the derivative table for rxode2rxode2parseD
Control the packages that are loaded when a 'rxode2' model dll is loadedrxode2parseAssignPackagesToLoad rxode2parseGetPackagesToLoad
This function gets the currently assigned function pointer assignmentsrxode2parseGetPointerAssignment
This function gets the currently assigned translationsrxode2parseGetTranslation
Optimize rxode2 for computer evaluationrxOptExpr
Simulate ordinal valuerxord
Parameters specified by the modelrxParam rxParams rxParams.rxEt rxParams.rxode2 rxParams.rxSolve
Respect suppress messagesrxParseSuppressMsg
Creates a package from compiled rxode2 modelsrxPkg
Simulate random Poisson variable from threefry generatorrxpois
Simulate a from a Poisson processrxPp
Change distribution name to the preferred distribution name termrxPreferredDistributionName
rxode2 progress bar functionsrxProgress rxProgressAbort rxProgressStop rxTick
Creates a rxRateDur objectas.character.rxRateDur as.rxRateDur rxRateDur [.rxRateDur [[.rxRateDur
rxRemoveControl options for UI objectrxRemoveControl
Rename items inside of a 'rxode2' ui model.rxRename rename.function rename.rxUi rxRename rxRename.default rxRename.function rxRename.rxUi
A list and description of rxode2 supported reserved keywordsrxReservedKeywords
A description of Rode2 supported residual errorsrxResidualError
Simulate from a (truncated) multivariate normalrxRmvn
Load a model into a symengine environmentrxS
rxSetControl options for UI objectrxSetControl
Assign covariates for pipingrxSetCovariateNamesForPiping
Set Initial conditions to time zero instead of the first observed/dosed timerxSetIni0
Set the variables for the model piping automatic covarite selectionrxSetPipingAuto
Defunct setting of productrxSetProd
Set timing for progress barrxSetProgressBar
Set the parallel seed for rxode2 random number generationrxSetSeed
Defunct setting of sumrxSetSum
Use Shiny to help develop an rxode2 modelrxShiny rxShiny.default rxShiny.rxSolve
Simulate Parameters from a Theta/Omega specificationrxSimThetaOmega
Options, Solving & Simulation of an ODE/solved systempredict.function predict.rxEt predict.rxode2 predict.rxParams predict.rxSolve predict.rxUi rxControl rxSolve rxSolve.default rxSolve.function rxSolve.nlmixr2FitCore rxSolve.nlmixr2FitData rxSolve.rxode2tos rxSolve.rxUi simulate.rxode2 simulate.rxParams simulate.rxSolve solve.function solve.rxEt solve.rxode2 solve.rxParams solve.rxSolve solve.rxUi update.rxSolve
Stack a solved object for things like default ggplot2 plotrxStack
State variablesrxState
Recast model in terms of sum/prodrxSumProdModel
Get list of supported functionsrxSupportedFuns
Respect suppress messagesrxSuppressMsg
Get Omega^-1 and derivativesrxSymInvChol
Sync options with rxode2 variablesrxSyncOptions
A list and description of Rode supported syntax functionsrxSyntaxFunctions
Simulate student t variable from threefry generatorrxt
Get the rxode2 temporary directoryrxTempDir
rxTheme is the ggplot2 theme for rxode2 plotsrxTheme
rxode2 to symengine environment.rxFromSE .rxToSE rxFromSE rxToSE
Translate the model to C code if neededrxTrans rxTrans.character rxTrans.default
Return the data.frame that is being processed or setup data.frame for processingrxUdfUiData
Return the current estimation method for the UI processingrxUdfUiEst
Get the rxode2 iniDf of the current UI being processed (or return NULL)rxUdfUiIniDf
Return the lhs parsed language expressionrxUdfUiIniLhs
Return the model variables that is being processed or setup model variables for processingrxUdfUiMv
This gives the current number in the ui of the particular function being called.rxUdfUiNum
Returns if the current ui function is being parsedrxUdfUiParsing
Compress/Decompress 'rxode2' uirxUiCompress rxUiDecompress
This is a generic function for deparsing certain objects when printing out a rxode2 object. Currently it is used for any meta-informationrxUiDeparse rxUiDeparse.default rxUiDeparse.lotriFix rxUiDeparse.rxControl
S3 for getting information from UI modelrxUiGet rxUiGet.allCovs rxUiGet.cmtLines rxUiGet.covLhs rxUiGet.default rxUiGet.dvidLine rxUiGet.etaLhs rxUiGet.fun rxUiGet.funPrint rxUiGet.funTxt rxUiGet.ini rxUiGet.iniFun rxUiGet.interpLines rxUiGet.levels rxUiGet.lhsCov rxUiGet.lhsEta rxUiGet.lhsTheta rxUiGet.lhsVar rxUiGet.lstChr rxUiGet.md5 rxUiGet.model rxUiGet.modelDesc rxUiGet.modelFun rxUiGet.multipleEndpoint rxUiGet.muRefTable rxUiGet.omega rxUiGet.paramsLine rxUiGet.props rxUiGet.simulationIniModel rxUiGet.simulationModel rxUiGet.simulationSigma rxUiGet.state rxUiGet.stateDf rxUiGet.statePropDf rxUiGet.symengineModelNoPrune rxUiGet.symengineModelPrune rxUiGet.theta rxUiGet.thetaLhs rxUiGet.thetaLower rxUiGet.thetaUpper rxUiGet.varLhs
Simulate uniform variable from threefry generatorrxunif
Unloads all rxode2 compiled DLLsrxUnloadAll
Use model object in your packagerxUse
Validate rxode2 This allows easy validation/qualification of nlmixr by running the testing suite on your system.rxTest rxValidate
Simulate Weibull variable from threefry generatorrxweibull
Preserved seed and possibly set the seedrxWithPreserveSeed rxWithSeed
Dosing/Amt geom/statgeom_amt stat_amt
Censoring geom/statgeom_cens stat_cens
Print expanded information about the rxode2 object.summary.rxode2
Swaps the matrix list with a cubeswapMatListWithCube
This function tests if this object is a iniDf as needed by the UIassertIniDf testIniDf
Test if rxode2 uses linear solved systemsassertRxLinCmt testRxLinCmt
Test if the rxode2 model has any parameters with user defined boundariesassertRxUnbounded testRxUnbounded warnRxBounded
Convert event data to trial duration data A helper function to create a custom event table. The observation time will start from the first event time (baseline) and end at trial duration. The interval is the spacing between each observation.toTrialDuration
Update for rxUiupdate.rxUi
uppergamma: upper incomplete gamma functionuppergamma
Set random effects and residual error to zerozeroRe