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

> ### Name: als
> ### Title: alternating least squares multivariate curve resolution
> ###   (MCR-ALS)
> ### Aliases: als
> ### Keywords: optimize
> 
> ### ** Examples
> 
> ## load 2 matrix datasets into variables d1 and d2
> ## load starting values for elution profiles
> ## into variables Cstart1 and Cstart2
> ## load time labels as x, m/z values as x2
> data(multiex)
> 
> ## starting values for elution profiles
> matplot(x,Cstart1,type="l")
> matplot(x,Cstart2,type="l",add=TRUE)
> 
> ## using MCR-ALS, improve estimates for mass spectra S and the two
> ## matrices of elution profiles
> ## apply unimodality constraints to the elution profile estimates
> ## note that the starting estimates for S just contain a dummy matrix
> 
> test0 <- als(CList=list(Cstart1,Cstart2),S=matrix(1,nrow=400,ncol=2),
+ PsiList=list(d1,d2), x=x, x2=x2, uniC=TRUE, normS=0)
Initial RSS 3.039967e+13 
Iteration (opt. S): 1, RSS: 1.330703e+12, RD: 0.9562264
Error in normS > S && (iter%%2 != b) : 
  'length = 800' in coercion to 'logical(1)'
Calls: als
Execution halted
Running examples in ‘ALS-Ex.R’ failed
The error most likely occurred in:

> ### Name: als
> ### Title: alternating least squares multivariate curve resolution
> ###   (MCR-ALS)
> ### Aliases: als
> ### Keywords: optimize
> 
> ### ** Examples
> 
> ## load 2 matrix datasets into variables d1 and d2
> ## load starting values for elution profiles
> ## into variables Cstart1 and Cstart2
> ## load time labels as x, m/z values as x2
> data(multiex)
> 
> ## starting values for elution profiles
> matplot(x,Cstart1,type="l")
> matplot(x,Cstart2,type="l",add=TRUE)
> 
> ## using MCR-ALS, improve estimates for mass spectra S and the two
> ## matrices of elution profiles
> ## apply unimodality constraints to the elution profile estimates
> ## note that the starting estimates for S just contain a dummy matrix
> 
> test0 <- als(CList=list(Cstart1,Cstart2),S=matrix(1,nrow=400,ncol=2),
+ PsiList=list(d1,d2), x=x, x2=x2, uniC=TRUE, normS=0)
Initial RSS 3.039967e+13 
Iteration (opt. S): 1, RSS: 1.330703e+12, RD: 0.9562264
Error in normS > S && (iter%%2 != b) : 
  'length = 800' in coercion to 'logical(1)'
Calls: als
Execution halted