vec2im: Internal scampr function that converts a vector to spatstat...

View source: R/vec2im.R

vec2imR Documentation

Internal scampr function that converts a vector to spatstat image given spatial locations.

Description

Internal scampr function that converts a vector to spatstat image given spatial locations.

Usage

vec2im(vec, x.loc, y.loc)

Arguments

vec

A vector of field values of equal length to locations x.loc and y.loc

x.loc

A vector of horizontal locations in 2D

y.loc

A vector of vertical locations in 2D

Value

a spatstat image (im) object

Examples

#' # Get the quadrature from the gorillas data
quad <- gorillas[gorillas$pres == 0, ]

elevation <- scampr:::vec2im(vec = quad$elevation, x.loc = quad$x, y.loc = quad$y)

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