tc_recode_speeds_uk: Recode maxspeed values in OSM

Description Usage Arguments Examples

View source: R/tc_recode.R

Description

Recode maxspeed values in OSM

Usage

1
2
3
4
5
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")
)

Arguments

x

Character string to recode

allowed_values

Values that can be returned, other than NA

pattern

A named character vector with values representing new values. Has the form c("Car long name" = "Car", "Taxi/Private hire car" = "Taxi"). Car long name will be converted into Car in this case.

Examples

1
2
x = c("30 mph", "10 mph", "60 mph", "25 mph", "30", "national")
tc_recode_speeds_uk(x)

saferactive/traffiCalmr documentation built on Nov. 18, 2021, 5:06 a.m.