Learn R Programming

futureheatwaves (version 1.0.0)

process_cities_file: Process city file

Description

This function takes the dataframe read in from the file specified with citycsv in gen_hw_set and renames the columns for latitude and longitude lat and lon, based on the user's selections in lat_lon_colnames for gen_hw_set. If there are extra columns besides those and the city column, this function removes them.

Usage

process_cities_file(cities, lat_lon_colnames)

Arguments

cities
Dataframe with study cities and their latitudes and longitudes.The dataframe must have a column named city with a unique identifier for each city in the study, as well as columns for latitude and longitude. Other columns may be included in th
lat_lon_colnames
A character vector of length two with the column names in the citycsv dataframe for latitude (first vector element) and longitude (second vector element)

Value

  • A processed version of the latitude and longitude dataframe.