Replies: 1 comment
-
Hi @ww2272 - I think this wasn't working due to a quirk in how the models are compiled under the hood. Can you try it like this? library(mrgsolve)
#>
#> Attaching package: 'mrgsolve'
#> The following object is masked from 'package:stats':
#>
#> filter
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
#create two compartment PK modeling for Lebrikizumab and APG777
mod_leb <- mod_leb <- mread("pk2", modlib())
#> Building pk2 ...
#> done.
#Update the models with respective CL levels for Lebrikizumab and APG777
#Human CL levels are translated from cynomolgus monkey data from the poster
mod_leb <- update(mod_leb, param = list(CL = 0.945))
mod_apg <- update(mod_apg, param = list(CL = 1.872))
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'update': object 'mod_apg' not found
mod_leb %>%
ev(amt=250) %>%
Req(CP) %>%
mrgsim(delta=1, end=2160) %>%
plot() Created on 2023-12-18 with reprex v2.0.2 Hopefully this works for you. What you proposed isn't unreasonable and I'll re-open the issue to look at supporting this in the future. Kyle |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am running the code as follows, but ran into an error. What is the problem?
library(mrgsolve)
library(dplyr)
#create two compartment PK modeling for Lebrikizumab and APG777
mod_leb <- mread("pk2", modlib())
mod_apg <- mread("pk2", modlib())
#Update the models with respective CL levels for Lebrikizumab and APG777
#Human CL levels are translated from cynomolgus monkey data from the poster
mod_leb <- update(mod_leb, param = list(CL = 0.945))
mod_apg <- update(mod_apg, param = list(CL = 1.872))
loadso(mod_leb)
mod_leb %>%
ev(amt=250) %>%
Req(CP) %>%
mrgsim(delta=1, end=2160) %>%
plot()
Error : [loadso] the model dll file doesn't exist
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 'plot':
There was a problem accessing the model shared object.
Either the model object was corrupted or the model was
not properly compiled and/or loaded. If the model is
not loaded, use
loadso(mod)
to do so. This is usuallyrequired for parallel simulation on a worker node that
was not forked (e.g. when using future::multisession).
Also check mrgsolve:::funset(mod) for more information.
Beta Was this translation helpful? Give feedback.
All reactions