[R] outer() is not working with my simple function

Christofer Bogaso bog@@o@chr|@to|er @end|ng |rom gm@||@com
Tue Dec 10 17:36:54 CET 2024


Hi,

I have below code

FN1 = function(x, y) 3

outer(1:9, 1:9, FN1)

With above I get error as below

Error in dim(robj) <- c(dX, dY) :

  dims [product 81] do not match the length of object [1]

Could you please help to understand why is it failing? I am just
expecting to get a matrix with all elements as 3



More information about the R-help mailing list