Anonymize locations of a trial site
anonymize_site.Rd
anonymize_site
transforms coordinates to remove potential identification information.
Details
The coordinates are transformed to support confidentiality of
information linked to households by replacing precise geo-locations with transformed co-ordinates which preserve distances
but not positions. The input may have either lat long
or x,y
coordinates.
The function first searches for any lat long
co-ordinates and converts these to x,y
Cartesian coordinates. These are then are rotated by a random angle about a random origin. The returned object
has transformed co-ordinates re-centred at the origin. Centroids stored in the "CRTsp"
object are removed.
Other data are unchanged.
Examples
#Rotate and reflect test site locations
transformedTestlocations <- anonymize_site(trial = readdata("exampleCRT.txt"))