Skip to contents

Get the last compiled model information as alist

Usage

rxLastCompile(what = c("msg", "stderr", "stdout", "c"))

Arguments

what

Which elements to message to the console; by default all of them. Use what="stderr" for the compiler error alone, or what=character(0) to message nothing and only take the returned list.

Value

A list contains the following elements:

  • msg the message for a bad compilation, or NULL if successful.

  • stdout the standard output from the compilation

  • stderr the standard error from the compilation

  • c the code code that was used

This list will be returned invisibly, but the function will also message the contents to the console.

Author

Matthew L. Fidler

Examples

# \donttest{
rxode2({
  a <- b
})
#>  
#>  
#> rxode2 5.1.9 model named rx_cde7f1be1dc6f24d6e277b678e2fffa4 model (✔ ready). 
#> value$params: b
#> value$lhs: a
rxLastCompile()
#> ── stderr ──────────────────────────────────────────────────────────────────────
#> using C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0’
#> In file included from rx_cde7f1be1dc6f24d6e277b678e2fffa4_.c:170:
#> /home/runner/work/_temp/Library/rxode2/include/rxode2_model_shared.h:177: warning: "rlnorm" redefined
#>   177 | #define rlnorm(x,y) rxlnorm(x,y)
#>       | 
#> In file included from /home/runner/work/_temp/Library/rxode2/include/rxode2.h:13,
#>                  from /home/runner/work/_temp/Library/rxode2/include/rxode2_model_shared.h:3:
#> /opt/R/4.6.1/lib/R/include/Rmath.h:337: note: this is the location of the previous definition
#>   337 | #define rlnorm          Rf_rlnorm
#>       | 
# }