I am on leave until mid-December 2020 and will only be checking emails very intermittently.
If you are a prospective student and have queries about the MSc in Computational Archaeology, please email Mark Lake (mark.l...@ucl.ac.uk). On 28 Aug 2020, at 02:17, ASANTOS via R-sig-Geo <r-sig-geo@r-project.org> wrote: Dear R-Sig_Geo Members, I'd like to find a more simple way to filtering a set of points in a "ppp" object by minimum or maximum distance. In my example using a ants ("ppp" object) in spatstat package: #Packages library(spatstat) library(sp) #Point process example data(ants) str(ants) #- attr(*, "class")= chr "ppp" #Computes the matrix of distances between all pairs of ants nests and selection of more than 20 m distance neighborhood ants.df<-as.data.frame(ants) coordinates(ants.df) <- ~x+y ants.dmat <- spDists(ants.df) #Calculate a distance matrix using spDists min.dist <- 20 #distance range ants.dmat[ants.dmat <= min.dist] <- NA # Na for less than 20 meters Here yet I need to start a relative long code for identified columns with NA in ants.dmat object, create a new data frame and than create a new ppp object based in the coordinates and marks etc... Is there any more easy way for create a new "ppp" object just only specified a distance rule that filtering a set of points in a original "ppp" object by minimum or maximum distance? Thanks in advanced, Alexandre -- Alexandre dos Santos Geotechnologies and Spatial Statistics applied to Forest Entomology Instituto Federal de Mato Grosso (IFMT) - Campus Caceres Caixa Postal 244 (PO Box) Avenida dos Ramires, s/n - Vila Real Caceres - MT - CEP 78201-380 (ZIP code) Phone: (+55) 65 99686-6970 / (+55) 65 3221-2674 Lattes CV: https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flattes.cnpq.br%2F1360403201088680&data=02%7C01%7C%7Ca70f07e55bbb49d60ec008d84af0479d%7C1faf88fea9984c5b93c9210a11d9a5c2%7C0%7C0%7C637341743158107956&sdata=yE4%2Fk76Ya9lntZoXFJsAUHg55rl%2BBVLBHuFk95Q4uc8%3D&reserved=0 OrcID: orcid.org/0000-0001-8232-6722 ResearchGate: https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.researchgate.net%2Fprofile%2FAlexandre_Santos10&data=02%7C01%7C%7Ca70f07e55bbb49d60ec008d84af0479d%7C1faf88fea9984c5b93c9210a11d9a5c2%7C0%7C0%7C637341743158107956&sdata=hLw2XYvqjhMn%2FuJOXmYu%2BHUKrLFgrZaxoSj6%2Bl%2BIm6Q%3D&reserved=0 Publons: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublons.com%2Fresearcher%2F3085587%2Falexandre-dos-santos%2F&data=02%7C01%7C%7Ca70f07e55bbb49d60ec008d84af0479d%7C1faf88fea9984c5b93c9210a11d9a5c2%7C0%7C0%7C637341743158107956&sdata=o%2FR75Akr9VE%2BF6GLEWHcEsbRtoRkLCkjsBk%2BXH%2F5yLc%3D&reserved=0 -- [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-geo&data=02%7C01%7C%7Ca70f07e55bbb49d60ec008d84af0479d%7C1faf88fea9984c5b93c9210a11d9a5c2%7C0%7C0%7C637341743158107956&sdata=%2Fhi%2Fkda%2FniyJ0GuRmnZvoBPl92%2BwmORhGcZFNShiNRc%3D&reserved=0 [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo