View source: R/pp-std_dev_ellipse.R
std_dev_ellipse | R Documentation |
From an sf object containing points, calculate the standard deviational ellipse.
std_dev_ellipse(geometry)
geometry |
an sfc object. If a polygon, uses |
The bulk of this function is derived from the archived CRAN package aspace version 3.2.0.
An sf object with three columns
sx
: major axis radius in CRS units,
sy
: minor axis radius in CRS units,
theta
: degree rotation of the ellipse.
sf object's geometry is the center mean point.
#' # Make a grid to sample from
grd <- sf::st_make_grid(n = c(1, 1), cellsize = c(100, 100), offset = c(0,0))
# sample 100 points
pnts <- sf::st_sample(grd, 100)
std_dev_ellipse(pnts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.