Hello, I am trying to write a simulation to generate a null hypothesis so that I can test my data. Essentially we started out with a grid of points and I have a symmetrical matrix of the distance between all of these points. I then want to simulate random movement. So I want to be able to start at a point, search through the matrix for the three closest points and with equal probability move to one of them or stay at the same place and then record the distance moved as well as the relative elevation (a vector of data that I also have) and then starting at that grid-point repeat the process a number of times. Does anyone know of a function that could help me with this?
Thanks, Ryan ~~~~~~~~~~~~~~~~~~ Ryan D. Briscoe Runquist Population Biology Graduate Group University of California, Davis [EMAIL PROTECTED] ______________________________________________ R-help@stat.math.ethz.ch 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.