Function to sum rasters of species layers

sumRastersBySpecies(speciesLayers, layersToSum, filenameToSave,
  newLayerName)

Arguments

speciesLayers

stack of species layers rasters

layersToSum

names/indices of layers to be summed - optional

filenameToSave

file path to save output raster

newLayerName

name of the output raster layer