I have a raster stack, stk, consisting of three raster images in R. Here is a simple example
stk
# set up a raster stack with three layers > library(
A bit late but might help someone else looking for a possible solution:
writeRaster(stk, filename=names(stk), bylayer=TRUE,format="GTiff")