Hi All,

I want to do something along the lines of:
for (i in 1:n){
    for (j in 1:n){
        A[i,j]<-myfunc(x[i], x[j])
    }
}

The question is what would be the most efficient way of doing this. Would
using functions such as sapply be more efficient that using a for loop?

Note that n can be a few thousand. Thus atleast a 1000x1000 matrix.

Thanks,
Sachin

	[[alternative HTML version deleted]]

