area | R Documentation |
Calculate the area covered by the given slendr object
area(x)
x |
Object of the class |
Area covered by the input object. If a slendr_pop
was given, a table with an population range area in each time
point will be returned. If a slendr_region
or
slendr_world
object was specified, the total area covered
by this object's spatial boundary will be returned.
region_a <- region("A", center = c(20, 50), radius = 20)
region_b <- region("B", polygon = list(c(50, 40), c(70, 40), c(70, 60), c(50, 60)))
plot_map(region_a, region_b)
# note that area won't be *exactly* equal to pi*r^2:
# https://stackoverflow.com/a/65280376
area(region_a)
area(region_b)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.