You can refer to records in a register by CURIEs of the form "prefix:reference", where the prefix is the name of the register, and the reference is a value in a field of the register. rr_index() indexes records by these CURIES.

rr_index(register, key = NULL)

Arguments

register

An object of class "register".

key

Character, the name of the field to use as theh reference part of the CURIE. If ommitted (default) then the 'key' field of the register is used (the field with the same name as the register, that is guaranteed to have unique values)

Examples

country <- rr_register("country") rr_index(country, "start-date")
#> # A tibble: 50 x 2 #> .curie .data #> <chr> <list> #> 1 country: <tibble [155 × 11]> #> 2 country:1975-11-11 <tibble [1 × 11]> #> 3 country:1981-11-01 <tibble [1 × 11]> #> 4 country:1991-09-21 <tibble [1 × 11]> #> 5 country:1991-08-30 <tibble [1 × 11]> #> 6 country:1991-08-25 <tibble [1 × 11]> #> 7 country:1981-09-21 <tibble [1 × 11]> #> 8 country:1992-03-03 <tibble [1 × 11]> #> 9 country:1984-01-01 <tibble [1 × 11]> #> 10 country:1975-07-05 <tibble [1 × 11]> #> # ... with 40 more rows
rr_index(country, "end-date")
#> # A tibble: 5 x 2 #> .curie .data #> <chr> <list> #> 1 country:1991-12-25 <tibble [1 × 11]> #> 2 country:1990-10-02 <tibble [2 × 11]> #> 3 country:1992-04-28 <tibble [1 × 11]> #> 4 country:1992-12-31 <tibble [1 × 11]> #> 5 country: <tibble [202 × 11]>
rr_index(country)
#> # A tibble: 199 x 2 #> .curie .data #> <chr> <list> #> 1 country:SU <tibble [1 × 11]> #> 2 country:DE <tibble [2 × 11]> #> 3 country:DD <tibble [1 × 11]> #> 4 country:YU <tibble [1 × 11]> #> 5 country:CS <tibble [1 × 11]> #> 6 country:GB <tibble [1 × 11]> #> 7 country:AF <tibble [1 × 11]> #> 8 country:AL <tibble [1 × 11]> #> 9 country:DZ <tibble [1 × 11]> #> 10 country:AD <tibble [1 × 11]> #> # ... with 189 more rows
rr_index(rr_register("local-authority-eng"), "local-authority-type")
#> # A tibble: 7 x 2 #> .curie .data #> <chr> <list> #> 1 local-authority-eng:UA <tibble [56 × 11]> #> 2 local-authority-eng:MD <tibble [37 × 11]> #> 3 local-authority-eng:CTY <tibble [29 × 11]> #> 4 local-authority-eng:NMD <tibble [203 × 11]> #> 5 local-authority-eng:LBO <tibble [32 × 11]> #> 6 local-authority-eng:CC <tibble [1 × 11]> #> 7 local-authority-eng:SRA <tibble [1 × 11]>