library(mrgsolve)
## mrgsolve: Community Edition
## www.github.com/metrumresearchgroup
code <- '
Sys.setenv(PATH="") | |
library(mrgsolve) | |
## Warning: | |
## Could not find R program in PATH. | |
## If you are compiling your own models, please first make sure that | |
## the following command runs properly from your R prompt: | |
## system("R CMD SHLIB -v") |
library(mrgsolve)
## mrgsolve: Community Edition
## www.github.com/metrumresearchgroup/mrgsolve
code <- '
$THETA
1 2 3
$THETA name="theta"
library(mrgsolve) | |
code <- ' | |
$GLOBAL | |
double wt_fr_age(const double age) { | |
return(age*2/3); | |
} | |
$PARAM WEIGHT = 5, AGE=2, WTFLAG = 0 |
if(!require(devtools)) install.packages("devtools") |
.libPaths("~/Rlibs") ## Change this to your Rlibs directory | |
if(!require(devtools)) install.packages("devtools") | |
library(devtools) | |
update.packages(ask=FALSE) | |
devtools::install_github("metrumresearchgroup/[email protected]", subdir="rdev", type="source") | |
> | |
> data <- expand.ev(amt=100) | |
> | |
> | |
> mod <- mrgsolve:::house() | |
> x <- mod %>% data_set(data) | |
> simargs(x) | |
$data | |
ID amt evid cmt time ..zeros.. | |
[1,] 1 100 1 1 0 0 |
library(future) | |
library(future.BatchJobs) | |
library(mrgsolve) | |
library(dplyr) | |
library(parallel) | |
mod <- mrgsolve:::house() | |
data <- expand.ev(amt=100,ID=1:200) | |
> f <- future({ | |
+ a <- 7 | |
+ b <- 3 | |
+ c <- 2 | |
+ a * b * c | |
+ }) | |
> as.list(f) | |
$local | |
[1] TRUE |
--- | |
output: pdf_document | |
params: | |
model: "" | |
project: "" | |
--- | |
```{r,echo=FALSE} |