simple_basis: Create a single resolution, regular grid of basis function...

View source: R/simple_basis.R

simple_basisR Documentation

Create a single resolution, regular grid of basis function nodes in flat 2D space

Description

Uses data provided to place points across the range of the provided coordinates. The points are set out along the wider coordinate range according to the number provided. Points along the shorter ranging coordinate then adhere to this spacing. The points are then returned as a data frame of the same format as in 'FRK::auto_basis', the scale is provided based on one of two radius options. For use in bi-square basis functions with local support.

Usage

simple_basis(
  nodes.on.long.edge,
  data,
  radius.type = c("diag", "limiting"),
  coord.names = c("x", "y"),
  longlat = FALSE
)

Arguments

nodes.on.long.edge

integer describing the number of basis function nodes to place along the longest edge of the domain

data

a data frame containing the two coordinates described by 'coord.names'

radius.type

character string describing the type of radius length to use. One of 'diag' = diagonal dist. between nodes or 'limiting' = sqrt(Domain Area)/log(k).

coord.names

vector of character strings describing the names of the coordinates in 'data'. Ordered horizontal axis to vertical

longlat

a logical indicating whether the coordinates are in Longitude and Latitude so that the radius can be extended to the maximum geodesic distance between nodes. Defaults to FALSE.

Value

a simple basis data frame of class 'bf.df'. 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
bfs <- simple_basis(nodes.on.long.edge = 9, data = gorillas)

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