find_keys look at all function in a table and returns the list of possible keys (ie variables which identifies an observation)

find_keys(table)

Arguments

table

the name of the input table (either tibble or data.frame)

Value

a tibble with one column : keys

Examples

library("readr") read_csv(system.file("extdata", "table_deputes.csv", package = "tricky")) %>% find_keys()
#> Parsed with column specification: #> cols( #> nom = col_character(), #> genre = col_character(), #> prenom = col_character(), #> nom_famille = col_character(), #> date_naissance = col_datetime(format = ""), #> lieu_naissance = col_character(), #> circonscription = col_character(), #> sycomore_id = col_integer(), #> wikidata = col_character(), #> frwiki = col_character() #> )
#> Warning: Truncating vector to length 1
#> keys #> 1 nom #> 2 genre #> 3 prenom #> 4 nom_famille #> 5 date_naissance #> 6 lieu_naissance #> 7 circonscription #> 8 sycomore_id #> 9 wikidata #> 10 frwiki