Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


spNetwork (version 0.2.1)

split_by_grid: Split data with a grid

Description

Function to split the dataset according to a grid.

Usage

split_by_grid(grid, samples, events, lines, bw, tol, digits, split_all = TRUE)

Arguments

grid

A spatial grid to split the data within

samples

A spatialPointsDataFrame of the samples points

events

A spatialPointsDataFrame of the events points

lines

A SpatialLinesDataFrame representing the network

bw

The kernel bandwidth (used to avoid edge effect)

tol

A float indicating the spatial tolerance when snapping events on lines

digits

The number of digits to keep

split_all

A boolean indicating if we must split the lines at each vertex (TRUE) or only at event vertices (FALSE)

Value

A list with the split dataset

Examples

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

Run the code above in your browser using DataLab