Calculate the area covered by the given slendr objectSource:
Calculate the area covered by the given slendr object
Area covered by the input object. If a
was given, a table with an population range area in each time
point will be returned. If a
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) #>  1256.063 area(region_b) #>  400