metrumresearchgroup / mrgsolve

Simulate from ODE-based population PK/PD and QSP models in R
https://mrgsolve.org
GNU General Public License v2.0
132 stars 36 forks source link

mread cache gets the project folder wrong when the full path is passed #1050

Closed kylebaron closed 1 year ago

kylebaron commented 1 year ago

When you pass the full path to a model file to mread_cache(), it crumps.

> mod <- mread_cache("../model/sim/207.mod", capture = "CLI")
Error: project directory '__/model/sim' must exist and be readable.
> mod <- mread_cache("207.mod", project = "../model/sim", capture = "CLI")
Building 207_mod ... done.
kylebaron commented 1 year ago

Reproducible in package

> x <- mread_cache("../m4solve/inst/models/1005.cpp")
Error: project directory '__/m4solve/inst/models' must exist and be readable.
kylebaron commented 1 year ago

Fixed now

> x <- mread_cache("../m4solve/inst/models/1005.cpp")
Loading required namespace: xml2
Building 1005_cpp ... done.