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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: makeDepmix
> ### Title: Dependent Mixture Model Specifiction: full control and adding
> ###   response models
> ### Aliases: makeDepmix makeMix
> ### Keywords: methods
> 
> ### ** Examples
> 
> 
> # below example recreates the same model as on the fit help page in a roundabout way
> # there we had:
> # mod1 <- depmix(list(rt~1,corr~1),data=speed,transition=~Pacc,nstates=2,
> #	 family=list(gaussian(),multinomial("identity")),ntimes=c(168,134,137))
> 
> data(speed)   
> 
> rModels <- list(
+ 	list(
+ 		GLMresponse(formula=rt~1,data=speed,family=gaussian()),
+ 		GLMresponse(formula=corr~1,data=speed,family=multinomial("identity"))
+ 	),
+ 	list(
+ 		GLMresponse(formula=rt~1,data=speed,family=gaussian()),
+ 		GLMresponse(formula=corr~1,data=speed,family=multinomial("identity"))
+ 	)
+ )
> 
> transition <- list()
> transition[[1]] <- transInit(~Pacc,nstates=2,data=speed)
> transition[[2]] <- transInit(~Pacc,nstates=2,data=speed)
> 
> inMod <- transInit(~1,ns=2,data=data.frame(rep(1,3)),family=multinomial("identity"))
> mod <- makeDepmix(response=rModels,transition=transition,prior=inMod,
+ ntimes=c(168,134,137),homogeneous=FALSE)
> 
> set.seed(3)
> fm1 <- fit(mod)
converged at iteration 26 with logLik: -248.9722 
> fm1
Convergence info: Log likelihood converged to within tol. (relative change) 
'log Lik.' -248.9722 (df=11)
AIC:  519.9444 
BIC:  564.8739 
> summary(fm1)
Initial state probabilities model 
pr1 pr2 
  0   1 

Transition model for state (component) 1 
Model of type multinomial (mlogit), formula: ~Pacc
Coefficients: 
            St1       St2
(Intercept)   0 -4.222831
Pacc          0  9.133835
Probalities at zero values of the covariates.
0.9855546 0.01444536 

Transition model for state (component) 2 
Model of type multinomial (mlogit), formula: ~Pacc
Coefficients: 
            St1       St2
(Intercept)   0 -3.373357
Pacc          0 15.804314
Probalities at zero values of the covariates.
0.9668614 0.03313859 


Response parameters 
Resp 1 : gaussian 
Resp 2 : multinomial 
    Re1.(Intercept) Re1.sd Re2.inc Re2.cor
St1           5.522  0.203   0.474   0.526
St2           6.394  0.237   0.096   0.904
> 
> 
> # generate data from two different multivariate normal distributions
> m1 <- c(0,1)
> sd1 <- matrix(c(1,0.7,.7,1),2,2)
> m2 <- c(1,0)
> sd2 <- matrix(c(2,.1,.1,1),2,2)
> set.seed(2)
> y1 <- mvrnorm(50,m1,sd1)
> y2 <- mvrnorm(50,m2,sd2)
> # this creates data with a single change point
> y <- rbind(y1,y2)
> 
> # now use makeDepmix to create a depmix model for this bivariate normal timeseries
> rModels <-  list()
> rModels[[1]] <- list(MVNresponse(y~1))
Error in model.frame.default(formula = formula, data = data, drop.unused.levels = TRUE,  : 
  'data' must be a data.frame, environment, or list
Calls: MVNresponse ... .local -> eval -> eval -> model.frame -> model.frame.default
Execution halted