My RStudio is crashing when I run a simulation use mrgsolve. I get a "bomb" icon with "R session Aborted". I am running the following R code below for the simulation. How can I resolve this?
mod <- mcode("repa_ddi", code)
--- 2. Create Population Data (10 Subjects x 50 Simulations = 500 IDs) ---
Yes thats what I wanted to say with my question. For my master thesis i had to buy a new computer, because R-Studio always crashed.
However, there can be other reasons as well, such as mathematical mistakes in your C++ "code" object. As you simulate only 5 * 5 Id´s for me it is pretty much unlikely that it is due to high RAM requirement.
To better help you, it would be great if you could specify at which part you receive the session abortion. Is it already in this line:
mod <- mcode("repa_ddi_mock", code)
or later at this part where you use mrgsim() ?
out <- mod %>%
data_set(dosing_data) %>%
idata_set(idata) %>%
update(start = 144, end = 168, delta = 0.1) %>%
obsonly() %>%
mrgsim() %>%
as.data.frame() %>%
select(ID, time, CP_Repa, INH) %>%
mutate(time_norm = time - 144) %>%
left_join(idata, by = "ID")