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

> ### Name: step.ff.interaction
> ### Title: Stepwise variable selection procedure for FOF regression models
> ###   with two-way interactions
> ### Aliases: step.ff.interaction
> 
> ### ** Examples
> 
> 
> library(FRegSigCom)
> data(ocean)
> 
> Y=ocean$Salinity
> X=list()
> X[[1]]=ocean$Potential.density
> X[[2]]=ocean$Temperature
> X[[3]]=ocean$Oxygen
> X[[4]]=ocean$Chloropigment
> n.curves=length(X)
> ntot=dim(Y)[1]
> ntrain=60
> ntest=ntot-ntrain
> X.uncent=X
> for(i in 1:n.curves){
+   X[[i]]=scale(X.uncent[[i]],center=TRUE, scale=FALSE)
+ }
> lengthX=dim(X[[1]])[2]
> lengthY=dim(Y)[2]
> t.x=seq(0,1,length=lengthX)
> t.y=seq(0,1,length=lengthY)
> I.train=sample(1:ntot, ntrain)
> X.train=list()
> X.test=list()
> t.x.all=list()
> for(j in 1:n.curves){
+   X.train[[j]]=X[[j]][I.train,]
+   X.test[[j]]=X[[j]][-I.train,]
+   t.x.all[[j]]=t.x
+ }
> Y.train=Y[I.train, ]
> Y.test=Y[-I.train, ]
> 
> 
> ###############################
> #model selection
> ###############################
> 
> fit.step=step.ff.interaction(X.train, Y.train, t.x.all, t.y)
################################################################## 
Step  1
** CV procedure for calculation of CV error** 
min_cv_error 1e+020
current_cv_error 0.0349587
** determine effects added or removed from the current model ** 
the main effecs after this step= 1 2 4
the interaction effecs after this step is empty!
################################################################## 
Step  2
** CV procedure for calculation of CV error** 
min_cv_error 0.0349587
current_cv_error 0.0301336
** determine effects added or removed from the current model ** 
the main effecs after this step= 1 2 4
the interaction effecs after this step=
(2,2)
################################################################## 
Step  3
** CV procedure for calculation of CV error** 
min_cv_error 0.0301336
current_cv_error 0.0259739
** determine effects added or removed from the current model ** 
the main effecs after this step= 1 2
the interaction effecs after this step=
(2,2)
################################################################## 
Step  4
** CV procedure for calculation of CV error** 
min_cv_error 0.0259739
current_cv_error 0.0257188
** determine effects added or removed from the current model ** 
the main effecs after this step= 1 2 4
the interaction effecs after this step=
(2,2)
################################################################## 
Step  5
** CV procedure for calculation of CV error** 
min_cv_error 0.0257188
current_cv_error 0.0259739
################################################################## 
finally selected main effecs= 1 2
finally selected interation effecs=
(2,2)
################################################################## 
**CV procedure for nonadaptive fitting**
**(used to determine the adaptive constants)**