prune_simple_basis: Pruning for regular grids of bi-square basis functions in...

View source: R/prune_simple_basis.R

prune_simple_basisR Documentation

Pruning for regular grids of bi-square basis functions in flat 2D space

Description

Pruning for regular grids of bi-square basis functions in flat 2D space

Usage

prune_simple_basis(pres.locs, simple.bfs, min.points = 1)

Arguments

pres.locs

a data frame or matrix of 2 columns describing the horizontal and vertical coordinate locations for presence locations on which to base pruning.

simple.bfs

a data frame of class bf.df created by simple_basis() that describes the unpruned basis functions.

min.points

Optional. a postive integer describing the least number of points required within each basis function for it to be retained in the pruning. Default is 1, meaning all basis functions with no points within their radius are pruned.

Value

a simple basis data frame of class 'bf.df' pruned to the presence locations provided. Consisting of columns: horizontal axis location, vertical axis location, scale (radius), res (resolution id).

Examples

#' # Base the basis function nodes on the locations of presence records and quadrature
dat <- dat <- gorillas
bfs <- simple_basis(nodes.on.long.edge = 9, data = dat)
pruned.bfs <- prune_simple_basis(dat[dat$pres == 1, c("x", "y")], bfs)

ElliotDovers/scampr documentation built on March 17, 2024, 3:27 p.m.