
Hi all,

I'm a little new to R, so any help is appreciated.

I'm having a problem interpreting the output from my kernel density plot. The density numbers seem smaller than I would expect based on my observed data.

Here's an example dataset. Let's pretend I counted apples on apple trees in an orchard. Let's say the units are in metres.

library(maptools)
library(gstat)

#make observation window
x1<-seq(0,10, by=1)
y1<-seq(0,10, by=1)
df<-data.frame(x=rep(x1, each=length(y1)),y=rep(y1, length(x1)), z=1)
gridded(df)<-~x+y
df<-as(df, "SpatialGridDataFrame")
dfowin<-as(df,"owin")

#make a dataset to fit in the owin.
rx<-c(2,7,4,5,8,8,1,3,3,9)
ry<-c(6,5,1,1,4,5,7,1,9,8)
apples<-c(10,7,5,9,12,14,8,11,7,10)
rdf<-data.frame(x=rx,y=ry,apples=count)
coordinates(rdf)<-~x+y

#as.ppp
rdf1<-as(rdf["count"],"ppp")
rdf2<-ppp(x=rdf1$x,y=rdf1$y,marks=rdf1$marks,window=dfowin)
plot(rdf2)

plot(density(rdf2, sigma=1.4, weights=rdf2$marks, edge=FALSE))



So the highest density in the orchard is only 2.4 apples per metre... that doesn't seem right... Does it?



___________________________________________

Myles Falconer, Ontario Region Project Biologist,
Bird Studies Canada,
115 Front St., P.O. Box 160,
Port Rowan, ON
N0E 1M0 Canada
Email: mfalconer@birdscanada.org
Ph: 1-888-448-2473 ext. 165
Local Ph: 519-586-3531 ext. 165

BSC website: http://www.bsc-eoc.org/



	[[alternative HTML version deleted]]

