Easy-cheesy с библиотекой sp
.
library(sp)
# Create SpatialPoints out of coordinates.
# Assign WGS84 (EPSG 4326) coordinate reference system.
pts <- SpatialPoints(coords = data.frame(x = c(106.6874498, 106.6883199),
y = c(-6.2107887, -6.2069667)),
proj4string = CRS("+init=epsg:4326"))
# Transform SpatialPoints to EPSG 5330.
pts_epsg5330 <- spTransform(x = pts, CRSobj = CRS("+init=epsg:5330"))
Результат:
# Get coordinates of new SpatialPoints.
> coordinates(pts_epsg5330)
x y
[1,] 3532231 213991.4
[2,] 3532328 214415.3