Learn R Programming

mudata2 (version 1.1.3)

rename_locations: Rename identifiers in a mudata object

Description

These functions rename locations, datasets, params, and columns, making sure internal consistency is maintained. These functions use dplyr syntax for renaming (i.e. the rename function). This syntax can also be used while subsetting using select_locations and family.

Usage

rename_locations(.data, ...)

# S3 method for default rename_locations(.data, ...)

rename_params(.data, ...)

# S3 method for default rename_params(.data, ...)

rename_datasets(.data, ...)

# S3 method for default rename_datasets(.data, ...)

rename_columns(.data, ...)

# S3 method for default rename_columns(.data, ...)

Value

A modified mudata object

Arguments

.data

A mudata object

...

Variables to rename in the form new_var = old_var

See Also

rename, select_locations

Examples

Run this code
rename_datasets(kentvillegreenwood, avalley = ecclimate)
rename_locations(kentvillegreenwood, Greenwood = starts_with("GREENWOOD"))
rename_params(kentvillegreenwood, max_temp = maxtemp)
rename_columns(kentvillegreenwood, lon = longitude, lat = latitude)

Run the code above in your browser using DataLab