Could you please approve this question and let it be sent in R_help?
addendum on the question: it also fails when using a data.frame in guess,
so I have no clue
> guess(grnn, data.frame(x1=c(2), x2=c(4)))
Error in (X - Xa) %*% t(X - Xa) :
requires numeric/complex matrix/vector arguments
2013/11/6 Cyril Auburtin <cyril.auburtin@gmail.com>
> I'm trying grnn package, and reproduced the example (
> http://cran.r-project.org/web/packages/grnn/grnn.pdf), I tried the
> example with another x input column in the dataset:
>
> but I'm getting the following error "Error in Ya * patterns1 :
> non-conformable arrays", though I took care to pass an input of length
2
>
> n <- 100
> set.seed(1)
>
> x1 <- runif(n, -2, 2)
> x2 = x1^2
> y0 <- x1 * x2
>
> epsilon <- rnorm(n, 0, .1)
> y <- y0 + epsilon
> grnn <- learn(data.frame(y,x1, x2))
> grnn <- smooth(grnn,sigma=0.1)
> guess(grnn, c(2,4))
>
> # Error in Ya * patterns1 : non-conformable arrays
>
[[alternative HTML version deleted]]