dms column_to_decimal
dms_column_to_decimal.Rd
Convert a data frame column with degrees, minutes as well as seconds to decimal degrees.
See also
Other spatial:
CRS_extracter()
,
apply_grtsdb()
,
calculate_polygon_centroid()
,
collect_osm_features()
,
dms_to_decimal()
Examples
if (FALSE) { # \dontrun{
# Example data frame
df <- data.frame(
lat_Y = c("50\u00B045'38.7\"N", "50\u00B046'04.9\"N", "50\u00B045'19.7\"N",
"50\u00B045'18.0\"N", "50\u00B046'24.4\"N", "50\u00B045'29.2\"N"),
long_X = c("3\u00B010'26.0\"E", "3\u00B010'28.0\"E", "3\u00B010'25.0\"E",
"3\u00B010'24.0\"E", "3\u00B010'30.0\"E", "3\u00B010'27.0\"E"))
# Convert the lat_Y and long_X columns to decimal degrees
df <- dms_column_to_decimal(df, c("lat_Y", "long_X"))
# View the updated data frame
print(df)
} # }