calc_densities(shp, var, total.area.km2 = NA, drop = TRUE)
map
datashp
in number of squared kilometers. If NA
, and unit="km2"
, then the polygon coordinates are assumed to be in meters.length(var)==1
with density values. This can be appended directly to the shape file.