project_df: projects data.frame to another coordinate system

View source: R/project_df.R

project_dfR Documentation

projects data.frame to another coordinate system

Description

This function projects a data.frame to another coordinate system, which can be specified.

Usage

project_df(
  df,
  lon = "longitude",
  lat = "latitude",
  old_crs = "EPSG:4326",
  new_crs = "ESRI:54009"
)

Arguments

df

data.frame with columns for coordinates, e.g., longitude and latitude

lon

column name of the column containing information on longitude

lat

column name of the column containing information on latitude

old_crs

coordinate system of the input owin-object. Defaults to longitude/latitude "EPSG:4326"

new_crs

coordinate system of the output owin-object. Defaults to the Mollweide Projection "ESRI:54009"

Value

data.frame with projected coordinate-system

Examples

new_df <- project_df(mro2D$destination$recovery_data$b1,
old_crs = "ESRI:54009", new_crs = "EPSG:4326")


SaskiaSchirmer/CONSURE documentation built on Sept. 3, 2023, 8:52 a.m.