Re: [R-sig-Geo] Filtering a set of points in a "ppp" object by distance using marks

2020-09-16 Thread ASANTOS via R-sig-Geo
Hi Marcelino, Thanks so much, I just make a little change in your code: ddd <- nndist(insects.ppp, by=factor(insects.ppp$marks)) subset(insects.ppp,  marks=="termiNests" & ddd[,"antNests"] >20) I put `ddd[,"antNests"] >20` despite `ddd[,"termiNests"] >20` because I need "termiNests" mark far

Re: [R-sig-Geo] Filtering a set of points in a "ppp" object by distance using marks

2020-09-16 Thread ASANTOS via R-sig-Geo
Hi Marcelino, Thanks, I just make a little change in your code: ddd <- nndist(insects.ppp, by=factor(insects.ppp$marks)) subset(insects.ppp,  marks=="termiNests" & ddd[,"antNests"] >20) I put `ddd[,"antNests"] >20` despite `ddd[,"termiNests"] >20` because I need "termiNests" mark far 20 units

Re: [R-sig-Geo] Filtering a set of points in a "ppp" object by distance using marks

2020-09-16 Thread Marcelino de la Cruz Rot
Sorry, I meant to say subset(insects.ppp, marks=="termiNests" & ddd[,"antNests"] >20) El 16/09/2020 a las 9:18, Marcelino de la Cruz Rot escribió: Hi Alexandre, may be this? ddd <- nndist(insects.ppp, by=factor(insects.ppp$marks)) subset(insects.ppp,  marks=="termiNests" &

Re: [R-sig-Geo] Filtering a set of points in a "ppp" object by distance using marks

2020-09-16 Thread Marcelino de la Cruz Rot
Hi Alexandre, may be this? ddd <- nndist(insects.ppp, by=factor(insects.ppp$marks)) subset(insects.ppp,  marks=="termiNests" & ddd[,"termiNests"] >20) Cheers, Marcelino El 15/09/2020 a las 22:52, ASANTOS via R-sig-Geo escribió: Dear R-Sig-Geo Members, I'd like to find any way to

[R-sig-Geo] Filtering a set of points in a "ppp" object by distance using marks

2020-09-15 Thread ASANTOS via R-sig-Geo
Dear R-Sig-Geo Members, I'd like to find any way to filtering a set of points in a "ppp" object by minimum distance just only between different marks. In my example: #Package library(spatstat) #Point process example - ants data(ants)