A repository is an archive (such as a library) containing source documents. Adding repositories to a tidyged object can be achieved with the add_repo() function. The repo_address argument is an address() object defining the address of the repository. Up to 3 local address lines, phone numbers, emails, faxes, and web pages can be defined.

library(tidyged)

gedcom(subm("Me")) |> 
  add_repo(name = "A library",
           repo_address = address(local_address_lines = c("123 Library Road", "Turin Village"),
                                  city = "Manchester",
                                  state = "New Hampshire",
                                  postal_code = "123456",
                                  country = "United States of America",
                                  phone_number = c("645-618-6578", "645-618-6570", "645-618-6577"),
                                  email = c("enquiries@alibrary.com", "enquiries2@alibrary.com"),
                                  fax = "0947393",
                                  web_page = "www.alibrary.com")) |> 
  dplyr::filter(record == "@R1@") |> 
  knitr::kable()
#> Added Repository: @R1@
level record tag value
0 @R1@ REPO
1 @R1@ NAME A library
1 @R1@ ADDR
2 @R1@ ADR1 123 Library Road
2 @R1@ ADR2 Turin Village
2 @R1@ CITY Manchester
2 @R1@ STAE New Hampshire
2 @R1@ POST 123456
2 @R1@ CTRY United States of America
1 @R1@ PHON 645-618-6578
1 @R1@ PHON 645-618-6570
1 @R1@ PHON 645-618-6577
1 @R1@ EMAIL
1 @R1@ EMAIL
1 @R1@ FAX 0947393
1 @R1@ WWW www.alibrary.com
1 @R1@ CHAN
2 @R1@ DATE 22 JUN 2022

As with other records, various types of user-defined references can be defined (user_reference_numbers), as well as links to notes.

Next article: Source records >