Review
The script runs well, without issue. It explains well they chose the bands for task 1, and plots the plots it needs to in Task 2. They produce a value for part 3 that is also correct.
Getting the plots for Task 1 and 2 was a bit difficult, as the plots overwrite themselves. par(mfrow = c(1, 3)) could be used to plot multiple in a row.
There is a good amount of documentation and the script is well structured. However, points are taken because code remains that is clearly copy/pasted, which isnt inherantly wrong, but has no use in the script, i.e. the line :
Extract all data to a data.frame
df <- as.data.frame(getValues(alldata))