The result from st_area depends on what kind of object you feed it. Let's make some objects. First, three simple sfg polygons - the first two overlap, the third one doesn't:
b0 = st_buffer(st_point(c(0,0)),.1)
b1 = st_buffer(st_point(c(0,0.05)),.1)
b2 = st_buffer(st_point(c(.5,.5)),.1)
st_area of intersecting or non-intersecting objects here is well defined,...
@Spacedman's comment mentions that the area of non-overlapping objects will be 0, but it does not appear to be the case. As far as I experienced, the intersection of two non-overlapping objects is an SF object/geodataframe of dimension 0 * n (0 being the rows and n the columns) and has no geometry (rather than an empty geometry). Its st_area will be empty (...
The code below shows that the solution proposed by David_O does not work properly (i.e. does not keep the order of the points provided in the dataframe):
xy = data.frame(x = c(0,1,1,0,0,1,2,2,1,1),
y = c(0,0,1,1,0,0,0,1,1,0),
xys = st_as_sf(xy, coords=c("x","y"))
# Aggregate - which unions the ...
The GeoPackage driver for GDAL requires an installation of sqlite3 since the underlying database is an SQLite3 file. On a system without an sqlite3 installation, when configuring GDAL for building it will skip the GeoPackage driver. An admin unaware of the importance of GeoPackages might not be concerned by this since several other messages about drivers ...
I don't have a solution for the whole dataset, but it is possible to run a subset without too much problems as follows:
set memory.limit (it worked after rebooting my machine)
Subset the data to the absolute minimum you want to use
# Helsinki municipalities
demo.HR <- demographics %>%
filter(kunta %in% c('049','091','092',...