[R] Finding local maxima (height) in a matrix data (6 spatial coordinates)?

Ben Bolker bolker at ufl.edu
Thu Feb 21 14:59:57 CET 2008


Josep Maria Campanera Alsina <campanera <at> ub.edu> writes:

> 
> Dear all,
> I wonder which R algorithm could perform a search of local maxima in
> an spatial grid, in other words, having the coordinates of a map
> (x,y,z... up to 6 coordinates) and then the altitude/height at each
> point (h) (in total 7 numerical variables) I would like to localise
> the peaks (local maxima) of that topological surface. Which R
> algorithm can perform this?
> 

  optim finds local minima.
  The quick and dirty way to do this would be to
start optim at many randomly chosen starting points
within your space, and keep a list of the optima you
found.
  Try googling "tabu search continuous" if you're interesting
in some fancier approaches (don't think any of these are
implemented in R, though).

  good luck
    Ben Bolker



More information about the R-help mailing list