latlong_as_xy {CRTspat}  R Documentation 
latlong_as_xy
converts coordinates expressed as decimal degrees into x,y
latlong_as_xy(trial, latvar = "lat", longvar = "long")
trial 
A trial dataframe or list of class 
latvar 
name of column containing latitudes in decimal degrees 
longvar 
name of column containing longitudes in decimal degrees 
The output object contains the input locations replaced with Cartesian coordinates in units of km, centred on (0,0), corresponding to using the equirectangular projection (valid for small areas). Other data are unchanged.
A list of class "CRTsp"
containing the following components:
geom_full  list:  summary statistics describing the site 
trial  data frame:  rows correspond to geolocated points, as follows: 
x  numeric vector: xcoordinates of locations  
y  numeric vector: ycoordinates of locations  
...  other objects included in the input "CRTsp" object or data frame 

examplexy < latlong_as_xy(readdata("example_latlong.csv"))