knnde: K-nearest neighbor density estimation using R

Description Usage Arguments Value Examples

View source: R/knnde.R

Description

the k-nearest neighbor density estimation for two-dimensional value using R, and this function needs R_package "FNN"

Usage

1
knnde(x, k, xrange, yrange)

Arguments

x

data values which is two dimensional

k

the order of the nearest neighbor

xrange, yrange

the range of each dimension value

Value

estimated points' correspoding densities

Examples

1
2
3
4
5
6
7
8
## Not run: 
x <- as.matrix(faithful)
xrange <- seq(from = 1, to = 6, by = 0.1) 
yrange <- seq(from = 40, to = 100, by = 0.5)
k <- 5 
fit <- knnde(x, k, xrange, yrange)

## End(Not run)

SC19057/package documentation built on Jan. 3, 2020, 12:10 a.m.