Running examples in 'phenoCDM-Ex.R' failed
The error most likely occurred in:

> ### Name: fitCDM
> ### Title: Fit a CDM Model
> ### Aliases: fitCDM
> ### Keywords: CDM Fit Model
> 
> ### ** Examples
> 
> 
> #Summarize CDM Model Ouput
> 
> ssSim <- phenoSim(nSites = 2, #number of sites
+                   nTSet = 30, #number of Time steps
+                   beta = c(1, 2), #beta coefficients
+                   sig = .01, #process error
+                   tau = .1, #observation error
+                   plotFlag = TRUE, #whether plot the data or not
+                   miss = 0.05, #fraction of missing data
+                   ymax = c(6, 3) #maximum of saturation trajectory
+ )
> 
> ssOut <- fitCDM(x = ssSim$x, #predictors
+                 nGibbs = 200,
+                 nBurnin = 100,
+                 z = ssSim$z,#response
+                 connect = ssSim$connect, #connectivity of time data
+                 quiet=TRUE)
> 
> summ <- getGibbsSummary(ssOut, burnin = 100, sigmaPerSeason = FALSE)
> 
> colMeans(summ$ymax)
   ymax.1    ymax.2 
24.227821  5.448082 
> colMeans(summ$betas)
    beta.1     beta.2 
0.05708433 0.61268356 
> colMeans(summ$tau)
[1] 1.606402
> colMeans(summ$sigma)
[1] 0.01898061
> 
> 
> 
> 
> cleanEx()
Error: connections left open:
	"model\n                          {\n                          for (i in 1:N)\n                          {\n                            z[i] ~ dnorm(y[i], tau2)\n                          }\n\n                          tau2 <- pow(tau, -2)\n                          tau ~ dunif(0, 100)\n\n                          for (i in connectHead)\n                          {\n                            y[i] ~ dnorm(0, sigma2)\n                          }\n\n                          for (i in connectBody)\n                          {\n                            dy[i] ~ dnorm(x[i-1,]%*%beta*(1-y[i-1]/ymax[blocks[i]]), sigma2)\n                            y[i] <- y[i-1] + t[1]*min(0, dy[i]) + t[2]*dy[i] + t[3]*max(0, dy[i])\n                          }\n\n                          for (i in connectTail)\n                          {\n                            dy[i] ~ dnorm(x[i-1,]%*%beta*(1 - y[i-1]/ymax[blocks[i]]), sigma2)\n                            y[i] <- y
Execution halted