[R-sig-Geo] count points greater than in a raster

Lindsie McCabe lma243 at nau.edu
Wed Oct 5 19:50:02 CEST 2016


Hi All,

I am creating a raster map of insect occurrence records, right now I have
if counting up the number of occurrence points based on the pixel area.

However because there is one area that is highly abundant in occurrence
records it is saturating the rest of the map.

What I would like to do is call a function in R that says if count is
grater the 100,000 records count as 100,000.

This is the code I am working with now:
pop <- read.table("allGeo.tsv", header=TRUE, stringsAsFactors=FALSE)
head(pop)
r2 = raster (ncol=500,nrow=1000)
pr<-raster::rasterize(pop, r2, fun='count', cex=0.6)
cropbox2 <-c(-178,-49,18, 71)
pr2 <- crop(pr, cropbox2)
pr2
plot(pr2)


Thank you,


-- 
*Lindsie McCabe*
PhD Student
Department of Biology
Merriam Powell Center for Environmental Research
Northern Arizona University

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list