powered by
This function will round the inputed value to a co-ordinate present in the KG Climate Zone look up table.
RoundCoordinates(number, res = "course", latlong = "lat")
The value to round
Specify the resolution as a string - 'course' for lower resolution (default, 0.5 degrees), 'fine' for higher resolution (100s).
Whether the number is a latitude value ('lat', default), or longitude value ('lon') (this parameter is only used if res='fine').
The inputed number, rounded to a value ending in either .25 or .75 (course), or to nearest 'fine' (100s) resolution grid point.
# NOT RUN { RoundCoordinates(10.98) RoundCoordinates(10.98,res='fine',latlong='lon') # }
Run the code above in your browser using DataLab