Searches a data.frame for a column that includes 'id' in its name and is an unique identifier. Returns the index of the first column in the data.frame that meets these conditions.
Examples
df <- data.frame(id_not_unique = rep(1, 10),
unique_id = 1:10,
also_id = 21:30,
other = letters[1:10])
find_unique_id(df)
#> [1] 2