knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

tidyged.io

R-CMD-check CodeFactor

Import and export family tree GEDCOM files to and from tidy dataframes.

The package is part of the gedcompendium ecosystem of packages. This ecosystem enables the handling of tidyged objects (tibble representations of GEDCOM files), and the main package of this ecosystem is tidyged.

knitr::include_graphics("man/figures/allhex.png")

Installation

You can install the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("jl5000/tidyged.io")

Example

The easiest way to create a tidyged object is to import an existing GEDCOM file. The package comes with some sample GEDCOM files, which can be imported using the read_gedcom() function:

library(tidyged.io)

my_ged <- read_gedcom(system.file("extdata", "555SAMPLE.GED", package = "tidyged.io"))

class(my_ged)

These objects are a subclass of tibbles, which allows the use of existing tidyverse functions:

print(my_ged, n = Inf)

Many other GEDCOM readers will carry out extensive checks on every line of a GEDCOM file ensuring all tags and values are legal, and the grammar is used correctly. The tidyged.io package carries out very few checks, relying on the user to check their files beforehand (as described when loading the package). The few checks that are carried out include:

The package strives to modify as little of the file as possible on import, however it does ensure tags and some values are in upper/lower case in line with the GEDCOM specification and to ensure the correct functioning of gedcompendium packages.

In the future, the gedcompendium ecosystem may include a dedicated validation package, but this is currently a low priority.

If you want to export your file as a valid GEDCOM file, you can use the write_gedcom() function.

References



jl5000/tidyged.io documentation built on Aug. 11, 2022, 9:53 a.m.