Hello.
I'm trying to compare a value in a 2-D matrix with its 4 neighbours.
I think I could use row() and col() and use x[row(x)] and x[row(x)-1] etc...,
but I can't see how it would work.
Also, any way of having a matrix fill itself with its own coordinates would
also work.
Any ideas please.
Simon Parker
Imperial College
---------------------------------
A Smarter Email.
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.