It would be interesting to take a snapshot survey of R packages and open source Pharmacometrics / Clin Pharm tools to see what was available, where there is overlap, where there are gaps with the aim to come up with a plan for filling gaps in functionality, harmonising, directing effort in future. So if funding was made available, what would a given developer focus on first to add most value?
Bill Denney has done some excellent work collating packages that are available on CRAN in the Pharmacokinetics Task View: https://cran.r-project.org/view=Pharmacokinetics
With tools such as nlmixr, stan, saemix, mlxR, mrgsolve, PKPDsim, RxODE, PopED, PFIM, xpose, PsN etc. there are MANY tools out there to help us get our jobs done. But are there neat ways to tie these together into workflows? Is there a (standardised) library of basic PK models across these tools? What’s missing from our toolkit?
R packages (there are more, I’m sure, but this is my start):
- PMx/clin pharm specific
- PKNCA (I’m biased, but I do use it often)
- rstan, rstanarm
- nlme (yes, I still use it from time to time)
- Not specific to our tasks, but often used:
- knitr (we need reports)
- dplyr, tidyr (we need to have usable data)
I find that the biggest value add for me is quick, accurate data management. To that end, I’ve started writing PKNCA.portation with the goal of moving data around between some of these packages. It is very young (available on GitHub, but don’t use it for anything serious without checking your results).
PKNCA.portation generally focuses on moving data between R packages easily (focusing on the PKNCA objects). If I can move data between R packages with high fidelity, I can do the work I need more efficiently. An issue that I’ve observed with other packages is the loss of fidelity when code doesn’t know what to do with some part of the data. (This is not specific to anyone else’s package; it’s true across the board.)
Another tool that I see as missing is a good, general purpose, data quality checker. Have you ever received PK data where a pair of samples was switched or the QC sample was spiked into an analysis well? Have you ever seen clinical data where the body weight had digits transposed (a 95 kg individual just became a 59 kg individual)? I’d like to see some general purpose tools that can help find issues with data.