50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

ggspatial (version 1.0.2)

xy_transform: Coordinate transform

Description

Coordinate transform, propotating non-finite cases.

Usage

xy_transform(x, y, from = 4326, to = 4326, na.rm = FALSE)

Arguments

x

The x coordinate

y

The y coordinate

from

From CRS

to

To CRS

na.rm

Warn for non-finite cases?

Value

A data.frame with x and y components.

Examples

Run this code
# NOT RUN {
xy_transform(c(1, 2, 3), c(1, 2, 3), to = 3857)
xy_transform(c(1, 2, 3), c(NA, NA, NA), to = 3857)
xy_transform(c(1, 2, 3), c(NA, 2, 3), to = 3857)
xy_transform(c(1, 2, 3), c(1, 2, NA), to = 3857)

# }

Run the code above in your browser using DataLab