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

> ### Name: make.mpt.cf
> ### Title: Functions to transform MPT models.
> ### Aliases: make.mpt.cf lbmpt.to.mpt
> 
> ### ** Examples
> 
> model2 <- system.file("extdata", "rb.fig2.model", package = "MPTinR")
> 
> make.mpt.cf(model2)
 [1] "hank.join.9" "hank.join.8" "hank.join.7" "hank.join.6" "hank.join.5"
 [6] "hank.join.4" "hank.join.3" "hank.join.2" "hank.join.1" "c0"         
[11] "r0"          "1"           "4"           "u0"          "u0"         
[16] "2"           "3"           "u0"          "3"           "4"          
[21] "u0"          "5"           "6"           "c1"          "r1"         
[26] "7"           "10"          "u1"          "u1"          "8"          
[31] "9"           "u1"          "9"           "10"          "u1"         
[36] "11"          "12"          "c2"          "r2"          "13"         
[41] "16"          "u2"          "u2"          "14"          "15"         
[46] "u2"          "15"          "16"          "u2"          "17"         
[51] "18"          "c3"          "r3"          "19"          "22"         
[56] "u3"          "u3"          "20"          "21"          "u3"         
[61] "21"          "22"          "u3"          "23"          "24"         
[66] "c4"          "r4"          "25"          "28"          "u4"         
[71] "u4"          "26"          "27"          "u4"          "27"         
[76] "28"          "u4"          "29"          "30"         
> 
> make.mpt.cf(model2, treewise = TRUE)
[[1]]
 [1] "c0" "r0" "1"  "4"  "u0" "u0" "2"  "3"  "u0" "3"  "4" 

[[2]]
[1] "u0" "1"  "2" 

[[3]]
 [1] "c1" "r1" "1"  "4"  "u1" "u1" "2"  "3"  "u1" "3"  "4" 

[[4]]
[1] "u1" "1"  "2" 

[[5]]
 [1] "c2" "r2" "1"  "4"  "u2" "u2" "2"  "3"  "u2" "3"  "4" 

[[6]]
[1] "u2" "1"  "2" 

[[7]]
 [1] "c3" "r3" "1"  "4"  "u3" "u3" "2"  "3"  "u3" "3"  "4" 

[[8]]
[1] "u3" "1"  "2" 

[[9]]
 [1] "c4" "r4" "1"  "4"  "u4" "u4" "2"  "3"  "u4" "3"  "4" 

[[10]]
[1] "u4" "1"  "2" 

>   
> lbmpt.to.mpt(make.mpt.cf(model2, treewise = TRUE))
c0*r0 # category 1
(1-c0)*u0*u0 # category 2
(1-c0)*u0*(1-u0)+(1-c0)*(1-u0)*u0 # category 3
c0*(1-r0)+(1-c0)*(1-u0)*(1-u0) # category 4

u0 # category 1
(1-u0) # category 2

c1*r1 # category 1
(1-c1)*u1*u1 # category 2
(1-c1)*u1*(1-u1)+(1-c1)*(1-u1)*u1 # category 3
c1*(1-r1)+(1-c1)*(1-u1)*(1-u1) # category 4

u1 # category 1
(1-u1) # category 2

c2*r2 # category 1
(1-c2)*u2*u2 # category 2
(1-c2)*u2*(1-u2)+(1-c2)*(1-u2)*u2 # category 3
c2*(1-r2)+(1-c2)*(1-u2)*(1-u2) # category 4

u2 # category 1
(1-u2) # category 2

c3*r3 # category 1
(1-c3)*u3*u3 # category 2
(1-c3)*u3*(1-u3)+(1-c3)*(1-u3)*u3 # category 3
c3*(1-r3)+(1-c3)*(1-u3)*(1-u3) # category 4

u3 # category 1
(1-u3) # category 2

c4*r4 # category 1
(1-c4)*u4*u4 # category 2
(1-c4)*u4*(1-u4)+(1-c4)*(1-u4)*u4 # category 3
c4*(1-r4)+(1-c4)*(1-u4)*(1-u4) # category 4

u4 # category 1
(1-u4) # category 2

> 
> 
> 
> cleanEx()
Error: connections left open:
	vapply(x, oneLineDeparse, "") (textConnection)
	vapply(x, oneLineDeparse, "") (textConnection)
	vapply(x, oneLineDeparse, "") (textConnection)
	vapply(x, oneLineDeparse, "") (textConnection)
	vapply(x, oneLineDeparse, "") (textConnection)
	vapply(x, oneLineDeparse, "") (textConnection)
	vapply(x, oneLineDeparse, "") (textConnection)
	vapply(x, oneLineDeparse, "") (textConnection)
	vapply(x, oneLineDeparse, "") (textConnection)
	vapply(x, oneLineDeparse, "") (textConnection)
	vapply(x, oneLineDeparse, "") (textConnection)
	vapply(x, oneLineDeparse, "") (textConnection)
	vapply(x, oneLineDeparse, "") (textConnection)
	vapply(x, oneLineDeparse, "") (textConnection)
	vapply(x, oneLineDeparse, "") (textConnection)
Execution halted