What about this? Certainly not elegant, but in an event of emergency, even
the Devil will eat flies. :)
Note that due to the split, this can be very time consuming if you have a
lot of coordinates.

library(sp)
data()
data(meuse)
 xy <- meuse[c("x", "y")]
xy <- rbind(xy, xy[rep(1:5, 1:5), ]) #replicate some coordinates to make a
point
mys <- split(xy, f = list(xy$x, xy$y))
mys2 <- unlist(lapply(mys, nrow))

table(mys2)
mys2
    0     1     2     3     4     5     6
22489   150     1     1     1     1     1

mys[which(mys2 == 6)]
$`181307.333330`
         x      y
5   181307 333330
510 181307 333330
5.1 181307 333330
5.2 181307 333330
5.3 181307 333330
5.4 181307 333330

You now know what coordinate are duplicated as well as how many duplicates
you have.

HTH,
Roman



On Wed, Dec 28, 2011 at 5:39 PM, Komine <momadou@yahoo.fr> wrote:

> HI,
> I have a matrix containing 2 columns: coordinates X (longitude), Y
> (Latitude), representing the coordinates of burned pixels for 10 years. I
> want to known the pixels which burned once, twice, three times etc. in the
> 10 years. So I would like to obtain the frequency of the burned pixels.
> I used this following code which is good.
>
> > essai[which(duplicated(essai,incomparables=FALSE)==TRUE),]
>
> But I want to know the length of each duplicated coordinate. I used this
> code with length:
>
> > length(essai[which(duplicated(essai,incomparables=FALSE)==TRUE),])
>
> But it shows only the length of the first duplicated coordinate.
>
> Can you help me to resolve it!
> Thank you in advance
> Komine
>
> --
> View this message in context:
> http://r-sig-geo.2731867.n2.nabble.com/Number-of-duplicated-pixels-tp7133208p7133208.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



-- 
In God we trust, all others bring data.

	[[alternative HTML version deleted]]

