Learn R Programming

spNetwork (version 0.2.1)

simple_nkde: Simple NKDE algorithm

Description

Function to perform the simple nkde.

Usage

simple_nkde(graph, events, samples, bws, kernel_func, nodes, edges)

Arguments

graph

a graph object from igraph representing the network

events

a SpatialPointsDataFrame representing the events. It must be snapped on the network, and be nodes of the network. A column vertex_id must indicate for each event its corresponding node

samples

a SpatialPointsDataFrame representing the sampling points. The samples must be snapped on the network. A column edge_id must indicate for each sample on which edge it is snapped.

bws

a vector indicating the kernel bandwidth (in meters) for each event

kernel_func

a function obtained with the function select_kernel

nodes

a SpatialPointsDataFrame representing the nodes of the network

edges

a SpatialLinesDataFrame representing the edges of the network

Value

a dataframe with two columns. sum_k is the sum for each sample point of the kernel values. n is the number of events influencing each sample point

Examples

Run this code
# NOT RUN {
#This is an internal function, no example provided
# }

Run the code above in your browser using DataLab