library(IQRtools) library(tidyverse) license_IQRtools("880fb5c6674fc864-48424e-5fee2a22-5fc9dd5e858376c8") setwd("/IQDESKTOP/SHARE/material/") filename <- "mgs_pk_library/model_1cpt_linear_abs0.txt" model <- IQRmodel(filename) # Dosing dosing <- IQRdosing(TIME = 0, #Time of dose administration ADM = 1, #Dose goes to compartment 1 AMT = 10, #Amount of drud (dose) TINF = 1) #Infusion duration dosing <- IQRdosing(TIME = c(0, 12, 24, 36), ADM = c(1, 1, 1,1), AMT = c(1, 2, 4, 10), TINF = c(0.01, 1, 6, 10)) # Simulate model sim_results <- sim_IQRmodel(model, FLAGoutputsOnly = TRUE, #Show only output dosingTable = dosing, seq(0,100,by=0.1), #Define dosing parameters = c(CL = 1, Vc=100) #Update parameters ) # Plot the simulation results sim_results %>% ggplot(aes(TIME,OUTPUT1))+ geom_line()+ ylab("Concentration [mg/mL]")+ xlab("Time [Hours]")+ xpose::theme_bw2() #plot(sim_results)