Uses sf::sf_project() internally

project_df(
  df,
  x = "long",
  y = "lat",
  new_x = "x",
  new_y = "y",
  crs_from = "epsg:4326",
  crs_to = "epsg:8059"
)

Arguments

df

Dataframe. Needs coordinate columns

x, y

Character. Name of column with x and coords

new_x, new_y

Character. Name to give the transformed x and columns

crs_from, crs_to

Passed to the from and to arguments of sf::sf_project()

Value

Dataframe with additional, projected, x and y columns