Recode maxspeed values in OSM
tc_recode_speeds_uk( x, allowed_values = c("20 mph", "30 mph", "40 mph", "50 mph", "60 mph", "70 mph"), pattern = c(national = "60 mph", `0$` = "0 mph") )
x | Character string to recode |
---|---|
allowed_values | Values that can be returned, other than |
pattern | A named character vector with values representing new values.
Has the form |
x = c("30 mph", "10 mph", "60 mph", "25 mph", "30", "national") tc_recode_speeds_uk(x) #> [1] "30 mph" NA "60 mph" NA "30 mph" "60 mph"