Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

71 feature request r based user defined functions #72

Merged
merged 35 commits into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
96889f2
Add udf scaffolding
mattfidler Oct 27, 2023
5a1f322
Initial implementation (no tests yet)
mattfidler Oct 27, 2023
ef894bd
Setup some udf function tests
mattfidler Oct 28, 2023
8f8dfb8
Working udf; still needs work
mattfidler Oct 28, 2023
b4fd13d
Add udf information to model variables
mattfidler Oct 28, 2023
3e0aedb
Parsing adds normalized name; setup checks
mattfidler Oct 30, 2023
01ba839
Move C user function generation here
mattfidler Oct 30, 2023
293b228
Bug fix for rxRmFunParse
mattfidler Oct 31, 2023
754c9b8
Update rxode2parse to have locking mechanism for udf envir
mattfidler Oct 31, 2023
463265e
Update envir location
mattfidler Oct 31, 2023
e6e2e8d
Add md5 info based on environment address for r udf funs
mattfidler Oct 31, 2023
b8f87cf
Add udf info
mattfidler Nov 1, 2023
0e5b09e
Add more features to try to support ui $ udfs
mattfidler Nov 1, 2023
3263938
Fix spelling mistake
mattfidler Nov 1, 2023
a6bd5af
Change err message for function that was not found
mattfidler Nov 1, 2023
1fa077f
Fix typo
mattfidler Nov 1, 2023
f5cbea4
Only include udf function once
mattfidler Nov 1, 2023
5a30cd7
Move extraC.h down after variable declaration to support Rx_pow()
mattfidler Nov 2, 2023
8d532ec
remove derivatives as well
mattfidler Nov 2, 2023
fe0bf2b
Allow way to get environment for user functions
mattfidler Nov 2, 2023
0c222a3
Add ::check() fixes
mattfidler Nov 2, 2023
a356b22
CF fix
mattfidler Nov 2, 2023
9927786
Add .udfFindAndLock
mattfidler Nov 2, 2023
8668995
Expand .udfFindAndLock to ignore object search
mattfidler Nov 2, 2023
4e76353
Save environment information when udf is created, restore w/solve
mattfidler Nov 3, 2023
d769e71
Search for an environment where all functions exist
mattfidler Nov 3, 2023
052b792
Use search list instead of locking
mattfidler Nov 4, 2023
47e7282
Don't cache udfs
mattfidler Nov 4, 2023
891f400
Change to Sys.time()
mattfidler Nov 4, 2023
9c369e8
Fix typo
mattfidler Nov 4, 2023
2000bb8
Some bug fixes from rxode2 checks
mattfidler Nov 4, 2023
aa6285f
remove unneed return
mattfidler Nov 4, 2023
1cf3a6d
take out assign to NULL on reset
mattfidler Nov 4, 2023
aad620c
Add rxC export of rxFun
mattfidler Nov 5, 2023
be7213c
Add _udf to hash
mattfidler Nov 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Imports:
utils,
digest,
rex,
symengine,
data.table (>= 1.12.4)
Suggests:
testthat (>= 3.0.0),
Expand Down
13 changes: 13 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,29 @@
S3method(as.data.frame,rxEtTran)
S3method(print,rxModelVars)
export(.convertId)
export(.extraC)
export(.extraCnow)
export(.getLastIdLvl)
export(.getWh)
export(.rxC)
export(.rxSEeqUsr)
export(.rxTransInfo)
export(.rxode2parseFunPtrs)
export(.symengineFs)
export(.toClassicEvid)
export(.udfCallFunArg)
export(.udfEnvReset)
export(.udfEnvSet)
export(.udfEnvSetUdf)
export(.udfExists)
export(.udfMd5Info)
export(etTransParse)
export(forderForceBase)
export(rxDerived)
export(rxFunParse)
export(rxParseSetSilentErr)
export(rxParseSuppressMsg)
export(rxRmFunParse)
export(rxSetIni0)
export(rxode2parse)
export(rxode2parseAssignPackagesToLoad)
Expand Down
8 changes: 7 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# rxode2parse (development version)

* Added ability to query R user functions in a rxode2 model (will
force single threaded solve)

* Moved core `rxFunParse` and `rxRmFunParse` here so that C and R user
function clashes can be handled

* Model variables now tracks which compartments have a lag-time defined

* For compartment with steady state doses (NONMEM equivalent SS=1,
Expand All @@ -18,7 +24,7 @@

* Steady state bolus doses with `addl` are treated as non steady state
events (like what is observed in `NONMEM`)

* Timsort was upgraded; drop radix support in rxode2 struct

# rxode2parse 2.0.16
Expand Down
2 changes: 1 addition & 1 deletion R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ etTransEvidIsObs <- function(isObsSexp) {
#' @param ssAtDoseTime Boolean that when `TRUE` back calculates the
#' steady concentration at the actual time of dose, otherwise when
#' `FALSE` the doses are shifted
#'
#'
#' @return Object for solving in rxode2
#'
#' @keywords internal
Expand Down
Loading
Loading