Separates references cited in brackets or parentheses into multiple rows and splits the comma-delimited numeric strings and expands ranges like 7-9 into new rows
Examples
x <- data.frame(row = 1, text = "some important studies [7-9,15]")
separate_refs(x)
#> id match row text
#> 1 7 [7-9,15] 1 some important studies [7-9,15]
#> 1.1 8 [7-9,15] 1 some important studies [7-9,15]
#> 1.2 9 [7-9,15] 1 some important studies [7-9,15]
#> 1.3 15 [7-9,15] 1 some important studies [7-9,15]