Hello everyone
I'm relatively new in R coding and I have a problem using the function forrBuilder, from SPOT package.
> fitC <- forrBuilder(xe, ye, 1e-3, 1e2, "optim-L-BFGS-B" , 100,0,1,FALSE)
Error in x - matrix(rep(xmin, s), nrow = s, byrow = TRUE) : 
  non-conformable arrays
> traceback()
2: spotNormalizeMatrix(fit$X, ymin, ymax, lb, ub)
1: forrBuilder(xe, ye, 0.001, 100, "optim-L-BFGS-B", 100, 0, 1, 
       FALSE)

this function works well when my data (xe) are in 1D, but now i'm trying in 2D and i meet a problem which according to traceback() comes from the function spotNormalizeMatrix. So I tried with the same data and used spotNormalizeMatrix, and that s works fine (cf below). I dont understand because i looked into the function forrBuilder &  spotNormalizeMatrix, and they should be able to manage 2D... Did anyone have an idea about this issue?
Thanks in advance
> xe
     [,1] [,2]
[1,]  0.1  0.1
[2,]  0.5  0.5
[3,]  0.9  0.1
[4,]  0.1  0.9
[5,]  0.9  0.9
> a=spotNormalizeMatrix(xe, 0, 1, xmin = NULL, xmax = NULL) 
> a
$y
     [,1] [,2]
[1,]  0.0  0.0
[2,]  0.5  0.5
[3,]  1.0  0.0
[4,]  0.0  1.0
[5,]  1.0  1.0

$xmin
[1] 0.1 0.1

$xmax
[1] 0.9 0.9



 		 	   		  
	[[alternative HTML version deleted]]

