R code for Testing and implementation of the water quality metric for the 2017 and 2018 reef report cards (NESP TWQ 3.2.5, AIMS)