library(mrgsolve)
mod <- mread("irm1", modlib())## Compiling irm1 ...
## done.
| a <- 10 | |
| b <- 10 | |
| data <- data.frame(ID=1:5) | |
| test <- function(obj,envir) { | |
| a <- 100 | |
| if(missing(obj)) { | |
| obj <- Y~runif(a,a+b) |
| clang++ -std=c++11 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I../inst/include/ -DCPPTOML_USE_MAP -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Users/kyleb/Rlibs/lib/Rcpp/include" -fPIC -Wall -mtune=core2 -g -O2 -c RcppExports.cpp -o RcppExports.o | |
| clang++ -std=c++11 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I../inst/include/ -DCPPTOML_USE_MAP -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Users/kyleb/Rlibs/lib/Rcpp/include" -fPIC -Wall -mtune=core2 -g -O2 -c parse.cpp -o parse.o | |
| In file included from parse.cpp:22: | |
| In file included from ../inst/include/cpptoml.h:10: | |
| /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:1720:21: error: conversion from 'Rcpp::internal::generic_proxy<19>' to 'double' is ambiguous | |
| *__result = *__first; | |
| ^~~~~~~~ | |
| /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/ |
| # I don't know what the path to Rbuildtools is for you. | |
| # Mine is | |
| C:\\RBuildTools\\3.3\\bin | |
| C:\\RBuildTools\\3.3\\gcc-4.6.3\\bin | |
| ## Look in your computer for these two equivalent directories; version number (3.3) might be different | |
| ### START .Rprofile ***** the first character of the file name is a dot (period) ******* | |
| ## So my .Rprofile would be | |
| rtools <- "C:\\RBuildTools\\3.3\\bin;C:\\RBuildTools\\3.3\\gcc-4.6.3\\bin;" |
| set_my_path <- function() { | |
| FLAG <- "RTOOLS_WAS_SET" | |
| rtools <- 'C:\\RBuildTools\\3.3\\bin;C:\\RBuildTools\\3.3\\gcc-4.6.3\\bin;' | |
| if(Sys.getenv(FLAG)=="") { | |
| message("setting your path") | |
| Sys.setenv(PATH=paste0(rtools,Sys.getenv("PATH"))) | |
| do.call(Sys.setenv,setNames(list("yes"),FLAG)) | |
| } | |
| if(!grepl(rtools,Sys.getenv("PATH"),fixed=TRUE)) { |
| library(mrgsolve) | |
| code <- ' | |
| $PARAM CL = 1, V = 5, D1 = 1 | |
| $PKMODEL cmt="CENT" | |
| $MAIN | |
| D_CENT = D1; | |
| ' |
library(mrgsolve)
mod <- mread("irm1", modlib())## Compiling irm1 ...
## done.
library(mrgsolve)
mod <- mread("pk2", modlib())
#> Building pk2 ... done.
mod %>%
ev(amt = 100, rate = 3) %>%
mrgsim(end = 48, delta = 0.1) %>%
plotlibrary(mrgsolve)
#>
#> Attaching package: 'mrgsolve'
#> The following object is masked from 'package:stats':
#>
#> filter
library(dplyr)
#>
#> Attaching package: 'dplyr'library(mrgsolve)
#>
#> Attaching package: 'mrgsolve'
#> The following object is masked from 'package:stats':
#>
#> filter
library(dplyr)
#>