Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Okay that looks simple enough in R. If you can summarise that in your question and create some sample rasters (maybe like the ones in the Arc docs) I'll answer. Have flagged to re-open.
library(rgdal)
or other, check these out Merging multiple rasters in R or combine rasters into single raster with multiple field values in R