Dear R community,

I'm having hard time to understand the kde function in "ks" package. Let me
use a 3-dimensional kernel smooth example to explain my question using the
elevation data in geoR.

### here is what I did ###

library(ks)
require(geoR)
data(elevation)
elev.df <- data.frame(x = elevation$coords[,"x"], y =
elevation$coords[,"y"], z = elevation$data)
H<-Hpi(elev.df)
elev.smt<-kde(elev.df,H=H)
plot(elev.smt, drawpoints=TRUE)

If I understand it correctly, with the kde function, I'm using the two
coordinate variables x and y to estimate (or say smooth) elevation (z). Is
this correct?

With this kernel smooth, my goal is to identify peaks, which are defined as
areas that have estimated elevations >=950. Can someone show me how to do
this?

Thanks!


Best
Gary

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to