Memory efficient way to convert large raster stack to dataframe and merge with another dataframe
I am trying to convert a large raster stack (4 layers) to a data frame and then combine it with a smaller descriptor data frame in R. I need the 40 rows from the descriptor data frame to be repeated for every grid cell of the raster data frame. Is there a way to do this that is not so memory hungry (it crashes on an HPC running out of memory at 1000GB)?