Shortening column names of hydrological parameters to improve the readability of downloaded dataset and removing duplicated column names

hydro_shortening(data, col_names = "short", remove_duplicates = TRUE)

Arguments

data

downloaded dataset with original column names

col_names

three types of column names possible: "short" - default, values with shorten names, "full" - full English description, "polish" - original names in the dataset

remove_duplicates

whether to remove duplicated column names (default TRUE - i.e., columns with duplicated names are deleted)

Examples

monthly <- hydro_monthly(year = 1969) colnames(monthly)
#> [1] "id" "station" "riv_or_lake" "hyy" "idhyy" #> [6] "idex" "H" "Q" "T" "mm"
abbr <- hydro_shortening(data = monthly, col_names = "polish", remove_duplicates = TRUE) head(abbr)
#> id station riv_or_lake hyy idhyy idex H Q T mm #> 7165 150210180 ANNOPOL Wisła (2) 1969 1 1 258 288.000 NA 11 #> 7166 150210180 ANNOPOL Wisła (2) 1969 1 2 287 413.266 NA 11 #> 7167 150210180 ANNOPOL Wisła (2) 1969 1 3 323 582.000 NA 11 #> 7168 150210180 ANNOPOL Wisła (2) 1969 2 1 239 188.000 NA 12 #> 7169 150210180 ANNOPOL Wisła (2) 1969 2 2 270 316.806 NA 12 #> 7170 150210180 ANNOPOL Wisła (2) 1969 2 3 296 452.000 NA 12