is_siren detect if the variable match the pattern of a SIRENE number
is_siren(var)
var | name of a variable |
---|
a tibble with one boolean column
library("tibble") table_datadetective <- tibble( v1 = c("123456789", "234567890"), v2 = c("1234567890123", "1234567890234") ) is_siren(var = table_datadetective$v1)#> # A tibble: 1 x 1 #> x #> <lgl> #> 1 TRUEis_siren(var = table_datadetective$v2)#> # A tibble: 1 x 1 #> x #> <lgl> #> 1 FALSE