Adding phototagging R code