Map column names.
map_fields(data, mapping)
data | The data frame. |
---|---|
mapping | The mapping as a list. |
The data frame with mapped column names.
map_fields(data.frame(x=1:3, y=4:6), list(decimalLongitude="x", decimalLatitude="y"))#> decimalLongitude decimalLatitude #> 1 1 4 #> 2 2 5 #> 3 3 6