Replies: 2 comments
-
You can overlay the points, or arbitrary points since it is a ggplot object library(RxODE)
#> RxODE 1.1.5 using 4 threads (see ?getRxThreads)
#> no cache: create with `rxCreateCache()`
mod1 <-RxODE({
C2 = centr/V2;
C3 = peri/V3;
d/dt(depot) =-KA*depot;
d/dt(centr) = KA*depot - CL*C2 - Q*C2 + Q*C3;
d/dt(peri) = Q*C2 - Q*C3;
d/dt(eff) = Kin - Kout*(1-C2/(EC50+C2))*eff;
})
theta <-
c(KA=2.94E-01, CL=1.86E+01, V2=4.02E+01, # central
Q=1.05E+01, V3=2.97E+02, # peripheral
Kin=1, Kout=1, EC50=200) # effects
inits <- c(eff=1)
ev <- eventTable(amount.units='mg', time.units='hours')
ev$add.dosing(dose=10000, nbr.doses=10, dosing.interval=12)
ev$add.dosing(dose=20000, nbr.doses=5, start.time=120,
dosing.interval=24)
ev$add.sampling(0:240)
s <- rxSolve(mod1, theta, ev, inits)
library(ggplot2)
plot(s, C2) + geom_point()
# some arbitrary data points can be added as well
df <- data.frame(x=seq(1,50, by=5),y=seq(1,50, by=5))
plot(s, C2) + geom_point(aes(x=x,y=y),data=df,col="red") Created on 2022-05-05 by the reprex package (v2.0.1) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Great, thank you very much! |
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
-
Hello,
One can use
plot(myRxODE, variable)
to conveniently display a variable time course. Is it possible to then overlay points (from some arbitrary tribble, for instance) to the same figure? Thank you very much in advance.Beta Was this translation helpful? Give feedback.
All reactions