| get_parcel_centroids | R Documentation |
Finds the centroid of each parcel using one of three methods.
get_parcel_centroids(
vertices,
labels,
method = c("average", "surface", "geodesic"),
faces = NULL
)
vertices |
Numeric matrix (n x 3) of vertex coordinates. |
labels |
Integer vector of parcel labels. |
method |
Centroid method: |
faces |
Integer matrix (m x 3) of face indices. Required for
|
Numeric matrix (n_parcels x 3) with rownames set to parcel labels.
Markello RD et al. (2022) Nature Methods 19:1472-1480. doi:10.1038/s41592-022-01625-w
vertices <- matrix(rnorm(30), ncol = 3)
labels <- c(1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 3L)
get_parcel_centroids(vertices, labels, method = "average")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.