Hi Rebecca,
Jeff has suggested some streamlining of your r code (thanks Jeff), but I'd like to suggest an alternative approach that I think would streamline the whole process even more while giving you more flexibility in case you'd like to do things like change your threshold values. It would also make it easier to apply to non-projected raster data layers (although you'd be much better working with an appropriate projection when crating your raster data layers in the first place).
For this approach, you can stay within the QGIS environment (although you could do the same in R). First you create a polygon grid data of the same size and extent as your raster data layer (so it directy overlays it). This is done with the CREATE VECTOR GRID tool. Next, for this grid you use the FIELD CALCULATOR tool to calculate the area of each individual polygon in this grid (if you're using a projected coordinate system, which is highly adviseable, these should all be the same). After that, you use the POINT SAMPLING TOOL to extract the values for each raster data layer (current and future predicted distribution) to the attribute table of your polygon grid. This can either be the raw predicted likelihood of occurrence or the predicted presence-absence based on your threshold. Personally, I'd suggest the former.
Once you have the information in this table, then you have a number of options. Firstly, you can calculate the total area of grid cells for each model (current and/or future distirbution) by simply summing the area values for the polygon grid cells with values over your selected threshold. Secondly, you can look not just at the total area, but at which specific cells go from being occupied to being unoccupied, from unoccupied to occupied, stay occupied or remain unocccurlied over time based on your predictions.
Now, when it comes to working with multiple species, there are a number of key points. Firstly, when you use the POINT SAMPLING TOOL, you can extract values from pretty much as many rasters as you'd like in that one step, you just need to remember to use appropriate names so that you know which fields belong to which species and which time frames. This means you only need to do this step once to create one very large table with the information from all the species in it (as well as which cells have changed over time).
Second, once you have this table, you can either calculate the total area of cells above your chosen threshold just as before, but for multiple species. To automate in QGIS, you might have to use something like Modelbuilder, or Batch Processing, but these are relatively easy to use. However, since you know R, then I would suggest doing it in R and just running the code repeatedly by sampling the table based on each modelled value field and your given threshold before calculating the total area.
The main benefits of this are:
1. It removes any problems you may create by the incorrect use of preojections in R, which can be hard to detect since it is hard to visualise your data in R.
2. If someone suggests you should use a different threshold value, or wants you to explore the impact of your chosen threshold value, you can work with the same attribute table and just adjust the threshold you use in the final part.
3. You can use the polygon grid data layer to assess not just the change in area occupied, but look at which cells occupancy is predicted to change in, and this can be just as informative as looking at the changes in total area. In particularly, if there are barriers to movements between current suitable areas and future predicted suitable areas, then no matter how suitable they are, a population may not be able to access them and so will decline in distribution rather than shift to new areas.
This isn't necessarily a recommendation that you use a polygon grid data layer approach rather than a raster based one, just that it's an alternative worth thinking about, especially if you're working with raster data layers that are in the geographic projection rather than a true projected coordinate system (but it would be better not to be doing this in the first place).
All the best,
Colin