vec2mat | R Documentation |
Internal scampr function that converts a vector to matrix given spatial locations. For use in images
vec2mat(vec, x.loc, y.loc)
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 |
a matrix representing the locations of a regular spatial domain
# Get the quadrature from the gorillas data
quad <- gorillas[gorillas$pres == 0, ]
elevation <- scampr:::vec2mat(vec = quad$elevation, x.loc = quad$x, y.loc = quad$y)
image(elevation, asp = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.