Description Usage Arguments Value Examples
getlatlong takes a SpatialPolygonsDataFrame, from the sp package, and converts it into a classic data.frame and includes the long and lat of each record as the last two columns. Thanks to Craig Mundy for this function.
1 | getlatlong(x)
|
x |
a SpatialPolygonsDataFrame, from the sp package |
a data.frame equivalent to x_at_data plus the long and lat as the last two columns
1 2 3 4 5 | ## Not run:
# ab <- readRDS(paste0(datadir,"G1Ha_2018_10_23.rds"))#get spatial obj
# abdat <- getlatlong(ab) # convert to data.frame + lat long
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.