| project_table | R Documentation |
Elements of the input that are NA are returned as NA
project_table(
x = data.frame(lon = c(-72, -63), lat = c(39, 46)),
from_crs = ifelse(use_wkt("sf"), "epsg:4326",
"+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0"),
to_crs = ifelse(use_wkt("sf"), "epsg:32619", "+proj=utm +zone=19 ellps=WGS84"),
from_names = c("lon", "lat"),
to_names = c("x", "y")
)
x |
table(data.frame or tibble) with columns specified by |
from_crs |
projection of the source coordinates - see |
to_crs |
projection of the source coordinates - see |
from_names |
string, the names of the x and y coords to project from, ['lon', 'lat'] default. |
to_names |
string, the names of the x and y coords to project into, ['x', 'y'] default.
If from_names is the same as to_names then replacement occurs, otherwise two
new columns |
updated table
## Not run:
x <- data.frame(lon = c(-72, -63), lat = c(39, 46))
(y <- project_table(x, to_names = c("false_easting", "false_northing")))
# lon lat false_easting false_northing
# 1 -72 39 240199.8 4321059
# 2 -63 46 964564.1 5111577
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.