Hi,

I am trying to extract the values of the following matrix

my.mat <- matrix(sample(c(1,0),100,replace=T),ncol=10)

using a circular window/mask. I would like to be able to choose coordinates of window centre and circle radius. I looked into the raster and spatstat packages, and specifically the function disc(), but I could not get them to work properly.

Any help is really appreciated.

Cheers
Lorenzo

	[[alternative HTML version deleted]]

