Coordinate transform, propotating non-finite cases.
xy_transform(x, y, from = 4326, to = 4326, na.rm = FALSE)
The x coordinate
The y coordinate
From CRS
To CRS
Warn for non-finite cases?
A data.frame with x and y components.
xy_transform(c(1, 2, 3), c(1, 2, 3), to = 3857)
#> x y
#> 1 111319.5 111325.1
#> 2 222639.0 222684.2
#> 3 333958.5 334111.2
xy_transform(c(1, 2, 3), c(NA, NA, NA), to = 3857)
#> Warning: 3 non-finite points removed by xy_transform()
#> x y
#> 1 NA NA
#> 2 NA NA
#> 3 NA NA
xy_transform(c(1, 2, 3), c(NA, 2, 3), to = 3857)
#> Warning: 1 non-finite points removed by xy_transform()
#> x y
#> 1 NA NA
#> 2 222639.0 222684.2
#> 3 333958.5 334111.2
xy_transform(c(1, 2, 3), c(1, 2, NA), to = 3857)
#> Warning: 1 non-finite points removed by xy_transform()
#> x y
#> 1 111319.5 111325.1
#> 2 222639.0 222684.2
#> 3 NA NA