Skip to content

selecting n smallest values from a Raster

3 messages · Marcio Pupin Mello, Roman Luštrik

#
Dear list,
	I have a RasterLayer (raster package) and want to select "n" smallest 
values from it (values and coordinates). I figured out that the 
which.min function in the raster package give me the coordinate of the 
smallest value. But how could I get the 10 smallest values?
	I'm using last version of R for Windows and all the packages.
	Thanks in advance,
#
Great!
	I was trying "order(my.r)" instead of "order(my.r[])".
	Thank you Roman!
	Cheers,

Marcio
www.dsr.inpe.br/~mello
On 11/11/2013 11:15, Roman Lu?trik wrote: