Verify if the topographic site codes for ICDO3 comply with the ICDO3 coding rules.
check_topo.Rd
Verify if the topographic site codes for ICDO3 comply with the ICDO3 coding rules.
Arguments
- x
Character vector contains the topographic site codes for ICDO3.
- return
Character, specify the output type of the result. Options are as below.
'logical': Logical vector (default). Indicates whether the topographic site codes comply with ICDO3 coding rules. (TRUE for compliant, FALSE for non-compliant).
'formatted': Character vector containing formatted topographic site code for ICDO3.
Examples
topos <- c("C50.9", "16.2", "C151", "33.2")
check_topo(topos)
#> [1] TRUE TRUE TRUE FALSE
check_topo(topos, "formatted")
#> [1] "C50.9" "C16.2" "C15.1" NA