Running examples in ‘nonmemica-Ex.R’ failed
The error most likely occurred in:

> ### Name: rosetta
> ### Title: Translate Parameter Names
> ### Aliases: rosetta nms
> 
> ### ** Examples
> 
> library(magrittr)
> options(project = system.file('project/model',package='nonmemica'))
> 
> # we generate some nonmem parameter names in nonmem format
> 1001 %>% nms_nonmem -> nonmem
> nonmem
 [1] "THETA1"     "THETA2"     "THETA3"     "THETA4"     "THETA5"    
 [6] "THETA6"     "THETA7"     "OMEGA(1,1)" "OMEGA(2,1)" "OMEGA(2,2)"
[11] "OMEGA(3,1)" "OMEGA(3,2)" "OMEGA(3,3)" "SIGMA(1,1)" "SIGMA(2,2)"
attr(,"class")
[1] "nms_nonmem"
> 
> # from these we generate canonical and pmxTools equivalents
> canonical <- nms_canonical(nonmem)
> pmxtools <- nms_pmx(nonmem)
> canonical
 [1] "theta_01"    "theta_02"    "theta_03"    "theta_04"    "theta_05"   
 [6] "theta_06"    "theta_07"    "omega_01_01" "omega_02_01" "omega_02_02"
[11] "omega_03_01" "omega_03_02" "omega_03_03" "sigma_01_01" "sigma_02_02"
attr(,"class")
[1] "nms_canonical"
> pmxtools
 [1] "THETA1" "THETA2" "THETA3" "THETA4" "THETA5" "THETA6" "THETA7" "OMEGA1"
 [9] "OM2,1"  "OMEGA2" "OM3,1"  "OM3,2"  "OMEGA3" "SIGMA1" "SIGMA2"
attr(,"class")
[1] "nms_pmx"
> 
> # We demonstrate equivalence
> stopifnot(identical(nonmem, nms_nonmem(canonical)))
> stopifnot(identical(nonmem, nms_nonmem(pmxtools)))
> stopifnot(identical(canonical, nms_canonical(nonmem)))
> stopifnot(identical(canonical, nms_canonical(pmxtools)))
> stopifnot(identical(pmxtools, nms_pmx(nonmem)))
> stopifnot(identical(pmxtools, nms_pmx(canonical)))
> 
> # on-the-fly conversions
> nonmem %>% class
[1] "nms_nonmem"
> nonmem %>% nms_pmx
 [1] "THETA1" "THETA2" "THETA3" "THETA4" "THETA5" "THETA6" "THETA7" "OMEGA1"
 [9] "OM2,1"  "OMEGA2" "OM3,1"  "OM3,2"  "OMEGA3" "SIGMA1" "SIGMA2"
attr(,"class")
[1] "nms_pmx"
> nonmem %>% nms_canonical
 [1] "theta_01"    "theta_02"    "theta_03"    "theta_04"    "theta_05"   
 [6] "theta_06"    "theta_07"    "omega_01_01" "omega_02_01" "omega_02_02"
[11] "omega_03_01" "omega_03_02" "omega_03_03" "sigma_01_01" "sigma_02_02"
attr(,"class")
[1] "nms_canonical"
> nonmem %>% nms_canonical %>% nms_pmx
 [1] "THETA1" "THETA2" "THETA3" "THETA4" "THETA5" "THETA6" "THETA7" "OMEGA1"
 [9] "OM2,1"  "OMEGA2" "OM3,1"  "OM3,2"  "OMEGA3" "SIGMA1" "SIGMA2"
attr(,"class")
[1] "nms_pmx"
> nonmem %>% nms_canonical %>% nms_pmx %>% nms_nonmem
 [1] "THETA1"     "THETA2"     "THETA3"     "THETA4"     "THETA5"    
 [6] "THETA6"     "THETA7"     "OMEGA(1,1)" "OMEGA(2,1)" "OMEGA(2,2)"
[11] "OMEGA(3,1)" "OMEGA(3,2)" "OMEGA(3,3)" "SIGMA(1,1)" "SIGMA(2,2)"
attr(,"class")
[1] "nms_nonmem"
> 
> # comparison
> data.frame(
+  can = canonical,
+  non = nonmem,
+  pmx = pmxtools,
+  psn = 1001 %>% nms_psn
+ )
Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) : 
  cannot coerce class ‘"nms_canonical"’ to a data.frame
Calls: data.frame -> as.data.frame -> as.data.frame.default
Execution halted