| Title: | Create Family Tree GEDCOM Files with S7 Objects |
|---|---|
| Description: | Import, create, edit and export family tree GEDCOM files. Genealogical Data Communication (GEDCOM) is a flat text file format which contains many nested data structures representing genealogical records. This package automates away the complexity in constructing these files, representing them as S7 objects. |
| Authors: | Jamie Lendrum [aut, cre] (ORCID: <https://orcid.org/0000-0002-0734-4768>) |
| Maintainer: | Jamie Lendrum <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.4.0 |
| Built: | 2026-05-29 11:43:15 UTC |
| Source: | https://github.com/jl5000/gedcomS7 |
Create children records for a family
add_children(x, xref, sexes, chil_names = NULL, pedigrees = "BIRTH")add_children(x, xref, sexes, chil_names = NULL, pedigrees = "BIRTH")
x |
A gedcom object. |
xref |
The xref of a Family record. |
sexes |
A character string giving the sexes (from |
chil_names |
A character vector of children's names. If provided, it must be the same length as the number of sexes. If you don't want to provide a name for a child, set the name to "". Surnames must be enclosed in forward slashes. If all names you supply do not contain forward slashes then surnames will be taken from the father (or mother). |
pedigrees |
A character vector of pedigrees from |
A gedcom object with additional child records.
This function adds records for an individual's parents.
add_parents(x, xref, inc_sex = TRUE, fath_name = NULL, moth_name = NULL)add_parents(x, xref, inc_sex = TRUE, fath_name = NULL, moth_name = NULL)
x |
A gedcom object. |
xref |
The xref of an Individual record. |
inc_sex |
Whether to populate the sex of the parents. This will ensure that there is one male and one female parent. Otherwise the sex will be assigned as "U" (undetermined). |
fath_name, moth_name
|
Optional names to give to the parents. Surnames must be enclosed in forward slashes. |
This function may also create a Family record and will not modify existing parents.
A gedcom object with additional parent records.
Create sibling records for an individual
add_siblings(x, xref, sexes, sib_names = NULL, pedigrees = "BIRTH")add_siblings(x, xref, sexes, sib_names = NULL, pedigrees = "BIRTH")
x |
A gedcom object. |
xref |
The xref of an Individual record. |
sexes |
A character string giving the sexes (from |
sib_names |
A character vector of sibling's names. If provided, it must be the same length as the number of sexes. If you don't want to provide a name for a sibling, set the name to "". Surnames must be enclosed in forward slashes. If all names you supply do not contain forward slashes then surnames will be taken from the father (or mother). |
pedigrees |
A character vector of pedigrees from |
This function may also create a Family record and will not modify existing siblings.
A gedcom object with additional sibling records.
This creates a record for a spouse and potentially their Family record.
add_spouse(x, xref, sex = "U", spou_name = NULL, fam_xref = NULL)add_spouse(x, xref, sex = "U", spou_name = NULL, fam_xref = NULL)
x |
A gedcom object. |
xref |
The xref of an Individual record. |
sex |
The sex of the spouse. |
spou_name |
Optional name to give to the spouse. Surnames must be enclosed in forward slashes. |
fam_xref |
The cross-reference identifier of the Family record if it already exists. If this is not provided, a new Family record will be created. |
A gedcom object with additional spouse and Family records.
Create an address object
Address( full = character(0), city = character(0), state = character(0), postal_code = character(0), country = character(0), adr1 = character(0), adr2 = character(0), adr3 = character(0) )Address( full = character(0), city = character(0), state = character(0), postal_code = character(0), country = character(0), adr1 = character(0), adr2 = character(0), adr3 = character(0) )
full |
A full address as it would appear on a mailing label, with lines separated by a new line character. For example: "The White House\n1600 Pennsylvania Avenue N.W.\nWashington\nDC 20500\nUnited States of America" |
city |
The city component of the address. |
state |
The state component of the address. |
postal_code |
The postal code component of the address. |
country |
The country component of the address. |
adr1 |
Deprecated. |
adr2 |
Deprecated. |
adr3 |
Deprecated. |
An S7 object representing a GEDCOM ADDRESS_STRUCTURE.
Create an association object
Association( indi_xref = "@VOID@", indi_phrase = character(0), relation_is = character(0), relation_phrase = character(0), note_xrefs = character(0), notes = list(), citations = list() )Association( indi_xref = "@VOID@", indi_phrase = character(0), relation_is = character(0), relation_phrase = character(0), note_xrefs = character(0), notes = list(), citations = list() )
indi_xref |
The cross-reference identifier of an individual record. If the individual does not have a record, then this can be left blank and a void xref will be used. However, you should define an @indi_phrase. |
indi_phrase |
Textual information that cannot be expressed in the @indi_xref. |
relation_is |
The nature of the association. This must be a value from |
relation_phrase |
Textual information that cannot be expressed in the relation. |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
citations |
Associated sources. This can either be a |
An S7 object representing a GEDCOM ASSOCIATION_STRUCTURE.
Create a change date object
ChangeDate( date_exact = <object>, time = character(0), note_xrefs = character(0), notes = list() )ChangeDate( date_exact = <object>, time = character(0), note_xrefs = character(0), notes = list() )
date_exact |
An exact date given either as a formatted GEDCOM string, or a
|
time |
The time given either as a formatted GEDCOM string, or a
|
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
An S7 object representing a GEDCOM CHANGE_DATE.
Create a creation date object
CreationDate(date_exact = <object>, time = character(0))CreationDate(date_exact = <object>, time = character(0))
date_exact |
An exact date given either as a formatted GEDCOM string, or a
|
time |
The time given either as a formatted GEDCOM string, or a
|
An S7 object representing a GEDCOM CREATION_DATE.
Create a GEDCOM Exact Date object for today
date_exact_current()date_exact_current()
An S7 object representing a GEDCOM Exact Date for today.
Create a GEDCOM Approximate Date object
DateApprox(date_cal = character(0), about = TRUE, calc = FALSE, est = FALSE)DateApprox(date_cal = character(0), about = TRUE, calc = FALSE, est = FALSE)
date_cal |
A Calendar date given either as a formatted GEDCOM string, or a
|
about |
Whether the date is near to the date given. |
calc |
Whether the date is calculated from other values. |
est |
Whether the date is near to the date given, and is calculated from other values. |
An S7 object representing a GEDCOM Approximate Date.
Create a GEDCOM Calendar Date object
DateCalendar( year = integer(0), month = integer(0), day = integer(0), julian = FALSE )DateCalendar( year = integer(0), month = integer(0), day = integer(0), julian = FALSE )
year |
The year given as an integer (not 0). Negative years are interpreted as Before the Common Era (BCE). If BCE, only year should be provided. |
month |
The month of the year given as an integer between 1 and 12. |
day |
The day of the month given as an integer between 1 and 31. |
julian |
Whether the date is given in the Julian calendar. If not, it is assumed to be in the Gregorian calendar. |
An S7 object representing a GEDCOM Calendar Date.
Create a GEDCOM Exact Date object
DateExact(year = integer(0), month = integer(0), day = integer(0))DateExact(year = integer(0), month = integer(0), day = integer(0))
year |
The year given as an integer (greater than 0). |
month |
The month of the year given as an integer between 1 and 12. |
day |
The day of the month given as an integer between 1 and 31. |
An S7 object representing a GEDCOM Exact Date.
Create a GEDCOM Date Period object
DatePeriod(start_date = character(0), end_date = character(0))DatePeriod(start_date = character(0), end_date = character(0))
start_date |
The start of the period/range given either as a formatted GEDCOM string, or a
|
end_date |
The end of the period/range given either as a formatted GEDCOM string, or a
|
An S7 object representing a GEDCOM Date Period.
Create a GEDCOM Date Range object
DateRange(start_date = character(0), end_date = character(0))DateRange(start_date = character(0), end_date = character(0))
start_date |
The start of the period/range given either as a formatted GEDCOM string, or a
|
end_date |
The end of the period/range given either as a formatted GEDCOM string, or a
|
An S7 object representing a GEDCOM Date Range.
Create a GEDCOM Sorting Date object
DateSorting( date = character(0), date_phrase = character(0), time = character(0) )DateSorting( date = character(0), date_phrase = character(0), time = character(0) )
date |
The date given either as a formatted GEDCOM string, or a
|
date_phrase |
Textual information that cannot be expressed in the date. |
time |
The time given either as a formatted GEDCOM string, or a
|
An S7 object representing a GEDCOM Sorting Date.
Create a GEDCOM Date Value object
DateValue(date = character(0), date_phrase = character(0), time = character(0))DateValue(date = character(0), date_phrase = character(0), time = character(0))
date |
The date given either as a formatted GEDCOM string, or a
|
date_phrase |
Textual information that cannot be expressed in the date. |
time |
The time given either as a formatted GEDCOM string, or a
|
An S7 object representing a GEDCOM Date Value.
Summarise Family records in a dataframe
df_fam(x, xrefs = NULL)df_fam(x, xrefs = NULL)
x |
A gedcom object. |
xrefs |
A vector of xrefs to summarise. If this is left NULL, all relevant xrefs will be used. |
A dataframe summarising a Family record on each row.
Summarise a family's attributes/events in a dataframe
df_fam_facts(x, xref)df_fam_facts(x, xref)
x |
A gedcom object. |
xref |
The cross-reference identifier of a family record. |
A dataframe summarising an attribute/event on each row.
Summarise Individual records in a dataframe
df_indi(x, xrefs = NULL)df_indi(x, xrefs = NULL)
x |
A gedcom object. |
xrefs |
A vector of xrefs to summarise. If this is left NULL, all relevant xrefs will be used. |
A dataframe summarising an Individual record on each row.
Summarise an individual's attributes/events in a dataframe
df_indi_facts(x, xref)df_indi_facts(x, xref)
x |
A gedcom object. |
xref |
The cross-reference identifier of an individual record. |
A dataframe summarising an attribute/event on each row.
Summarise Multimedia records in a dataframe
df_media(x, xrefs = NULL)df_media(x, xrefs = NULL)
x |
A gedcom object. |
xrefs |
A vector of xrefs to summarise. If this is left NULL, all relevant xrefs will be used. |
A dataframe summarising a Multimedia record on each row.
Summarise Note records in a dataframe
df_note(x, xrefs = NULL)df_note(x, xrefs = NULL)
x |
A gedcom object. |
xrefs |
A vector of xrefs to summarise. If this is left NULL, all relevant xrefs will be used. |
A dataframe summarising a Note record on each row.
Summarise Repository records in a dataframe
df_repo(x, xrefs = NULL)df_repo(x, xrefs = NULL)
x |
A gedcom object. |
xrefs |
A vector of xrefs to summarise. If this is left NULL, all relevant xrefs will be used. |
A dataframe summarising a Repository record on each row.
Summarise Source records in a dataframe
df_sour(x, xrefs = NULL)df_sour(x, xrefs = NULL)
x |
A gedcom object. |
xrefs |
A vector of xrefs to summarise. If this is left NULL, all relevant xrefs will be used. |
A dataframe summarising a Source record on each row.
Summarise Submitter records in a dataframe
df_subm(x, xrefs = NULL)df_subm(x, xrefs = NULL)
x |
A gedcom object. |
xrefs |
A vector of xrefs to summarise. If this is left NULL, all relevant xrefs will be used. |
A dataframe summarising a Submitter record on each row.
Property requirements for fact objects.
fact_rules_df(type = NULL)fact_rules_df(type = NULL)
type |
A character string to filter the table. |
A dataframe detailing the property requirements for each type of fact.
Create an object recording facts covered in a source record
FactsRecorded( fact_types = character(0), date_period = character(0), date_phrase = character(0), territory = NULL )FactsRecorded( fact_types = character(0), date_period = character(0), date_phrase = character(0), territory = NULL )
fact_types |
A character string indicating the types of events that were recorded in a particular source. Each event type is separated by a comma and space. For example, a parish register of births, deaths, and marriages would be BIRT, DEAT, MARR. |
date_period |
A date period given either as a formatted GEDCOM string, or a
|
date_phrase |
Textual information that cannot be expressed in the date. |
territory |
The territory associated with the events covered. This can either be a
|
An S7 object representing a GEDCOM SOUR.EVEN structure.
Create a family attribute object
FamilyAttribute( fact_type = character(0), fact_val = character(0), fact_desc = character(0), date = character(0), place = NULL, address = NULL, phone_numbers = character(0), emails = character(0), faxes = character(0), web_pages = character(0), agency = character(0), relig_affil = character(0), cause = character(0), confidential = FALSE, locked = FALSE, private = FALSE, date_sort = character(0), associations = list(), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), unique_ids = character(0), husb_age = character(0), husb_age_phrase = character(0), wife_age = character(0), wife_age_phrase = character(0) )FamilyAttribute( fact_type = character(0), fact_val = character(0), fact_desc = character(0), date = character(0), place = NULL, address = NULL, phone_numbers = character(0), emails = character(0), faxes = character(0), web_pages = character(0), agency = character(0), relig_affil = character(0), cause = character(0), confidential = FALSE, locked = FALSE, private = FALSE, date_sort = character(0), associations = list(), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), unique_ids = character(0), husb_age = character(0), husb_age_phrase = character(0), wife_age = character(0), wife_age_phrase = character(0) )
fact_type |
A code indicating the type of fact. This must be taken from one of
|
fact_val |
A value associated with the fact. For example for "NCHI" this would
be the number of children. See |
fact_desc |
A further classification of the fact. This is required for generic
events or attributes. See |
date |
The date given either as a formatted GEDCOM string, or a
|
place |
The associated place. This can either be a
|
address |
The address given either as a |
phone_numbers |
A character vector of phone numbers. |
emails |
A character vector of email addresses. |
faxes |
A character vector of fax numbers. |
web_pages |
A character vector of web page URLs. |
agency |
The organization, institution, corporation, person, or other entity that has responsibility for the associated fact. Examples are an employer of a person of an associated occupation, or an educational establishment that has awarded a scholastic award. |
relig_affil |
A religious denomination associated with the fact. |
cause |
Used in special cases to record the reasons which precipitated the fact (e.g. cause of death). |
confidential |
A logical value indicating whether the associated record/fact should be treated as confidential. This allows them to be excluded on export. |
locked |
A logical value indicating whether the associated record/fact should be treated as read-only. |
private |
A logical value indicating whether the associated record/fact should be treated as private. This allows them to be excluded on export. |
date_sort |
The date given either as a formatted GEDCOM string, or a
|
associations |
Associated individuals. This can either be a |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
citations |
Associated sources. This can either be a |
media_links |
Associated multimedia. This can either be a |
unique_ids |
A character vector of enduring and globally-unique identifiers. These need
to be formatted in line with RFC 9562 and can be generated with |
husb_age |
A character string that indicates the age in years, months, weeks and/or days that the husband was at the time of the fact. Any combination of these is permitted. It is recommended that this be an age from a cited source document. Any labels must come after their corresponding number, for example; "4y 8m 1w 3d". Age bounds can also be included, for example; "< 40y". If the age doesn't fit this format then describe the age in the corresponding phrase parameter. |
husb_age_phrase |
Free text information that cannot be expressed in the husband's age. |
wife_age |
A character string that indicates the age in years, months, weeks and/or days that the wife was at the time of the fact. Any combination of these is permitted. It is recommended that this be an age from a cited source document. Any labels must come after their corresponding number, for example; "4y 8m 1w 3d". Age bounds can also be included, for example; "< 40y". If the age doesn't fit this format then describe the age in the corresponding phrase parameter. |
wife_age_phrase |
Free text information that cannot be expressed in the wife's age. |
An S7 object representing a GEDCOM FAMILY_ATTRIBUTE_STRUCTURE.
Create a family event object
FamilyEvent( fact_type = character(0), fact_val = character(0), fact_desc = character(0), date = character(0), place = NULL, address = NULL, phone_numbers = character(0), emails = character(0), faxes = character(0), web_pages = character(0), agency = character(0), relig_affil = character(0), cause = character(0), confidential = FALSE, locked = FALSE, private = FALSE, date_sort = character(0), associations = list(), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), unique_ids = character(0), husb_age = character(0), husb_age_phrase = character(0), wife_age = character(0), wife_age_phrase = character(0) )FamilyEvent( fact_type = character(0), fact_val = character(0), fact_desc = character(0), date = character(0), place = NULL, address = NULL, phone_numbers = character(0), emails = character(0), faxes = character(0), web_pages = character(0), agency = character(0), relig_affil = character(0), cause = character(0), confidential = FALSE, locked = FALSE, private = FALSE, date_sort = character(0), associations = list(), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), unique_ids = character(0), husb_age = character(0), husb_age_phrase = character(0), wife_age = character(0), wife_age_phrase = character(0) )
fact_type |
A code indicating the type of fact. This must be taken from one of
|
fact_val |
A value associated with the fact. For example for "NCHI" this would
be the number of children. See |
fact_desc |
A further classification of the fact. This is required for generic
events or attributes. See |
date |
The date given either as a formatted GEDCOM string, or a
|
place |
The associated place. This can either be a
|
address |
The address given either as a |
phone_numbers |
A character vector of phone numbers. |
emails |
A character vector of email addresses. |
faxes |
A character vector of fax numbers. |
web_pages |
A character vector of web page URLs. |
agency |
The organization, institution, corporation, person, or other entity that has responsibility for the associated fact. Examples are an employer of a person of an associated occupation, or an educational establishment that has awarded a scholastic award. |
relig_affil |
A religious denomination associated with the fact. |
cause |
Used in special cases to record the reasons which precipitated the fact (e.g. cause of death). |
confidential |
A logical value indicating whether the associated record/fact should be treated as confidential. This allows them to be excluded on export. |
locked |
A logical value indicating whether the associated record/fact should be treated as read-only. |
private |
A logical value indicating whether the associated record/fact should be treated as private. This allows them to be excluded on export. |
date_sort |
The date given either as a formatted GEDCOM string, or a
|
associations |
Associated individuals. This can either be a |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
citations |
Associated sources. This can either be a |
media_links |
Associated multimedia. This can either be a |
unique_ids |
A character vector of enduring and globally-unique identifiers. These need
to be formatted in line with RFC 9562 and can be generated with |
husb_age |
A character string that indicates the age in years, months, weeks and/or days that the husband was at the time of the fact. Any combination of these is permitted. It is recommended that this be an age from a cited source document. Any labels must come after their corresponding number, for example; "4y 8m 1w 3d". Age bounds can also be included, for example; "< 40y". If the age doesn't fit this format then describe the age in the corresponding phrase parameter. |
husb_age_phrase |
Free text information that cannot be expressed in the husband's age. |
wife_age |
A character string that indicates the age in years, months, weeks and/or days that the wife was at the time of the fact. Any combination of these is permitted. It is recommended that this be an age from a cited source document. Any labels must come after their corresponding number, for example; "4y 8m 1w 3d". Age bounds can also be included, for example; "< 40y". If the age doesn't fit this format then describe the age in the corresponding phrase parameter. |
wife_age_phrase |
Free text information that cannot be expressed in the wife's age. |
An S7 object representing a GEDCOM FAMILY_EVENT_STRUCTURE.
Create a family link (as child) object
FamilyLinkChild( fam_xref = character(0), note_xrefs = character(0), notes = list(), pedigree = character(0), pedigree_phrase = character(0), confidence = character(0), confidence_phrase = character(0) )FamilyLinkChild( fam_xref = character(0), note_xrefs = character(0), notes = list(), pedigree = character(0), pedigree_phrase = character(0), confidence = character(0), confidence_phrase = character(0) )
fam_xref |
The cross-reference identifier of a family record. |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
pedigree |
An optional value from |
pedigree_phrase |
An optional free-text phrase describing the nature of the
link. This is required if |
confidence |
An optional value from |
confidence_phrase |
An optional free-text phrase expanding on the confidence of the link. |
An S7 object representing a GEDCOM family link as a child.
Create a family link (as spouse) object
FamilyLinkSpouse( fam_xref = character(0), note_xrefs = character(0), notes = list() )FamilyLinkSpouse( fam_xref = character(0), note_xrefs = character(0), notes = list() )
fam_xref |
The cross-reference identifier of a family record. |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
An S7 object representing a GEDCOM family link as a spouse.
Create a family record object
FamilyRecord( XREF = "@GEDCOMS7_ORPHAN@", confidential = FALSE, locked = FALSE, private = FALSE, user_ids = character(0), unique_ids = character(0), ext_ids = character(0), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), created = NULL, updated = NULL, facts = list(), non_events = list(), husb_xref = character(0), wife_xref = character(0), chil_xrefs = character(0), associations = list(), subm_xrefs = character(0), spouse_sealings = list() )FamilyRecord( XREF = "@GEDCOMS7_ORPHAN@", confidential = FALSE, locked = FALSE, private = FALSE, user_ids = character(0), unique_ids = character(0), ext_ids = character(0), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), created = NULL, updated = NULL, facts = list(), non_events = list(), husb_xref = character(0), wife_xref = character(0), chil_xrefs = character(0), associations = list(), subm_xrefs = character(0), spouse_sealings = list() )
XREF |
The cross-reference identifier for this record. You should not edit this at all as maintenance of these is done automatically. |
confidential |
A logical value indicating whether the associated record/fact should be treated as confidential. This allows them to be excluded on export. |
locked |
A logical value indicating whether the associated record/fact should be treated as read-only. |
private |
A logical value indicating whether the associated record/fact should be treated as private. This allows them to be excluded on export. |
user_ids |
A character vector of user-generated identifiers. The type of the identifiers can be given in the vector names, e.g. c("Driving license number" = "ABC123") |
unique_ids |
A character vector of enduring and globally-unique identifiers. These need
to be formatted in line with RFC 9562 and can be generated with |
ext_ids |
A named character vector of identifiers maintained by an external authority. The names must be given as a URI. See the GEDCOM specification for more information. |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
citations |
Associated sources. This can either be a |
media_links |
Associated multimedia. This can either be a |
created |
A |
updated |
A |
facts |
Events and/or attributes for this family.
A |
non_events |
Events that this family did not experience.
A |
husb_xref, wife_xref, chil_xrefs
|
The cross-reference identifier(s) of member's individual records. If the individual does not have a record, then the value "@VOID@" can be used. However, you will need to describe the individual by using a named vector (a description can be used in either case), e.g. c("Joe Bloggs" = "@VOID@") or c("Joe Bloggs" = "@I1@"). |
associations |
Associated individuals. This can either be a |
subm_xrefs |
A character vector of relevant submitter record cross-reference identifiers. |
spouse_sealings |
A |
An S7 object representing a GEDCOM FAMILY_RECORD.
Create a GEDCOM header object
GedcomHeader( gedcom_version = character(0), ext_tags = character(0), source = NULL, destination = character(0), creation_date = <object>, creation_time = character(0), subm_xref = character(0), gedcom_copyright = character(0), default_language = character(0), default_place_form = character(0), notes = list(), note_xrefs = character(0) )GedcomHeader( gedcom_version = character(0), ext_tags = character(0), source = NULL, destination = character(0), creation_date = <object>, creation_time = character(0), subm_xref = character(0), gedcom_copyright = character(0), default_language = character(0), default_place_form = character(0), notes = list(), note_xrefs = character(0) )
gedcom_version |
The version number of the official specification that this GEDCOM conforms to. This must include the major and minor version (for example, “7.0”); it may include the patch as well (for example, “7.0.1”), but doing so is not required. |
ext_tags |
Not supported. |
source |
A |
destination |
An identifier for the system expected to receive this GEDCOM. |
creation_date |
The creation date of the file given either as a formatted GEDCOM string, or a
|
creation_time |
The creation time of the file given either as a formatted GEDCOM string, or a
|
subm_xref |
The cross-reference identifier of the primary submitter. |
gedcom_copyright |
A copyright statement, as appropriate for the copyright laws applicable to this data. |
default_language |
The default language for the entire GEDCOM object. |
default_place_form |
The default form for place names in the GEDCOM object. A comma-separated string of jurisdictional titles. For example "City, County, State, Country". |
notes |
Associated notes. This can either be a |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
An S7 object representing a GEDCOM header.
You shouldn't need to use this directly to create new GEDCOM objects. Instead, use
new_gedcom() which populates relevant defaults.
GedcomS7( header = GedcomHeader(), records = GedcomRecords(), update_change_dates = FALSE, add_creation_dates = FALSE )GedcomS7( header = GedcomHeader(), records = GedcomRecords(), update_change_dates = FALSE, add_creation_dates = FALSE )
header |
An S7 object whose properties contain information about the GEDCOM object as a whole. |
records |
An S7 object whose properties contain information about all records. Do not edit properties in capitals directly. See Details for more information. |
update_change_dates |
Whether to automatically update change dates when updating records. This happens when the record is pushed to the gedcom object. |
add_creation_dates |
Whether to automatically add creation dates when creating records. This happens when the record is pushed to the gedcom object. |
All information about records is contained in the @records property.
The @prefixes property is a named vector containing any alphanumeric string (up to 6 characters long)
which will precede the number given to identify new records, of which there are currently 7 types:
Individual (INDI) Family (FAM) Source (SOUR) Repository (REPO) Multimedia (OBJE) Note (SNOTE) Submitter (SUBM)
This vector must be of a particular length with specific names. For example: c(SUBM = "U", INDI = "I", FAM = "F", SOUR = "S", REPO = "R", OBJE = "M", SNOTE = "N").
The order that these records appear in the vector will also dictate the order in which records will appear in the exported file.
An S7 object representing a GEDCOM file.
Create a GEDCOM source object
GedcomSource( product_id = character(0), product_name = character(0), product_version = character(0), business_name = character(0), business_address = NULL, phone_numbers = character(0), emails = character(0), faxes = character(0), web_pages = character(0), data_name = character(0), data_pubdate = character(0), data_pubtime = character(0), data_copyright = character(0) )GedcomSource( product_id = character(0), product_name = character(0), product_version = character(0), business_name = character(0), business_address = NULL, phone_numbers = character(0), emails = character(0), faxes = character(0), web_pages = character(0), data_name = character(0), data_pubdate = character(0), data_pubtime = character(0), data_copyright = character(0) )
product_id |
An identifier for the product producing this dataset. |
product_name |
The name of the product producing this dataset. |
product_version |
The version of the product producing this dataset. |
business_name |
The name of the business, corporation, or person that produced or commissioned the product. |
business_address |
The address of the business, corporation, or person that produced
or commissioned the product. The address is given either as a |
phone_numbers |
A character vector of phone numbers. |
emails |
A character vector of email addresses. |
faxes |
A character vector of fax numbers. |
web_pages |
A character vector of web page URLs. |
data_name |
Deprecated. |
data_pubdate |
Deprecated. |
data_pubtime |
Deprecated. |
data_copyright |
Deprecated. |
An S7 object representing a GEDCOM HEAD.SOUR.
This function identifies records in an entire branch of the family tree above a certain individual.
get_ancestors( x, xref, inc_indi = FALSE, inc_sibs = FALSE, inc_fam = FALSE, inc_supp = FALSE, pedigrees = NULL )get_ancestors( x, xref, inc_indi = FALSE, inc_sibs = FALSE, inc_fam = FALSE, inc_supp = FALSE, pedigrees = NULL )
x |
A gedcom object. |
xref |
The xref of an Individual record. |
inc_indi |
Whether to also include the individual themselves. |
inc_sibs |
Whether to also include all siblings of ancestors (siblings of this individual will only be included if the individual is included). |
inc_fam |
Whether to also include all Family records where this individual is a child (and all ancestors' Family records). |
inc_supp |
Whether to also include all supporting records (Note, Source, Repository, Multimedia). |
pedigrees |
A character vector of allowed family-child linkages. By default, NULL means all pedigrees (e.g. inc. ADOPTED). If it includes "BIRTH" then this will also pick up non-existent values (since BIRTH is assumed to be the default). |
A character vector of xrefs.
This function identifies records in an entire branch of the family tree below a certain individual.
get_descendants( x, xref, inc_indi = FALSE, inc_part = FALSE, inc_fam = FALSE, inc_supp = FALSE, pedigrees = NULL )get_descendants( x, xref, inc_indi = FALSE, inc_part = FALSE, inc_fam = FALSE, inc_supp = FALSE, pedigrees = NULL )
x |
A gedcom object. |
xref |
The xref of an Individual record. |
inc_indi |
Whether to also include the individual themselves. |
inc_part |
Whether to also include all partners of this individual (and their descendants and descendants' partners). |
inc_fam |
Whether to also include all Family records where this individual is a partner (and all descendants' Family records). |
inc_supp |
Whether to also include all supporting records (Note, Source, Repository, Multimedia). |
pedigrees |
A character vector of allowed family-child linkages. By default, NULL means all pedigrees (e.g. inc. ADOPTED). If it includes "BIRTH" then this will also pick up non-existent values (since BIRTH is assumed to be the default). |
A character vector of xrefs.
Identify all families for an individual where they are a child
get_fam_as_child(x, xref, pedigrees = NULL)get_fam_as_child(x, xref, pedigrees = NULL)
x |
A gedcom object. |
xref |
The xref of an Individual record. |
pedigrees |
A character vector of allowed family-child linkages. By default, NULL means all pedigrees (e.g. inc. ADOPTED). If it includes "BIRTH" then this will also pick up non-existent values (since BIRTH is assumed to be the default). |
A character vector of xrefs.
Identify all families for an individual where they are a partner
get_fam_as_spouse(x, xref)get_fam_as_spouse(x, xref)
x |
A gedcom object. |
xref |
The xref of an Individual record. |
A character vector of xrefs.
Identify all children in a family
get_fam_children(x, xref, pedigrees = NULL)get_fam_children(x, xref, pedigrees = NULL)
x |
A gedcom object. |
xref |
The xref of a Family record. |
pedigrees |
A character vector of allowed family-child linkages. By default, NULL means all pedigrees (e.g. inc. ADOPTED). If it includes "BIRTH" then this will also pick up non-existent values (since BIRTH is assumed to be the default). |
A character vector of xrefs.
Identify all partners in a family
get_fam_partners(x, xref)get_fam_partners(x, xref)
x |
A gedcom object. |
xref |
The xref of a Family record. |
A character vector of xrefs.
Identify all children for an individual
get_indi_children(x, xref, pedigrees = NULL)get_indi_children(x, xref, pedigrees = NULL)
x |
A gedcom object. |
xref |
The xref of an Individual record. |
pedigrees |
A character vector of allowed family-child linkages. By default, NULL means all pedigrees (e.g. inc. ADOPTED). If it includes "BIRTH" then this will also pick up non-existent values (since BIRTH is assumed to be the default). |
A character vector of xrefs.
Identify all cousins for an individual
get_indi_cousins(x, xref, degree = 1, inc_half = FALSE)get_indi_cousins(x, xref, degree = 1, inc_half = FALSE)
x |
A gedcom object. |
xref |
The xref of an Individual record. |
degree |
Whether to return first cousins (degree = 1), second cousins (degree = 2), etc. |
inc_half |
Whether to include half cousins. |
A character vector of xrefs.
Identify all fathers for an individual
get_indi_fathers(x, xref, pedigrees = NULL)get_indi_fathers(x, xref, pedigrees = NULL)
x |
A gedcom object. |
xref |
The xref of an Individual record. |
pedigrees |
A character vector of allowed family-child linkages. By default, NULL means all pedigrees (e.g. inc. ADOPTED). If it includes "BIRTH" then this will also pick up non-existent values (since BIRTH is assumed to be the default). |
A character vector of xrefs.
Identify all mothers for an individual
get_indi_mothers(x, xref, pedigrees = NULL)get_indi_mothers(x, xref, pedigrees = NULL)
x |
A gedcom object. |
xref |
The xref of an Individual record. |
pedigrees |
A character vector of allowed family-child linkages. By default, NULL means all pedigrees (e.g. inc. ADOPTED). If it includes "BIRTH" then this will also pick up non-existent values (since BIRTH is assumed to be the default). |
A character vector of xrefs.
Identify all parents for an individual
get_indi_parents(x, xref, pedigrees = NULL)get_indi_parents(x, xref, pedigrees = NULL)
x |
A gedcom object. |
xref |
The xref of an Individual record. |
pedigrees |
A character vector of allowed family-child linkages. By default, NULL means all pedigrees (e.g. inc. ADOPTED). If it includes "BIRTH" then this will also pick up non-existent values (since BIRTH is assumed to be the default). |
A character vector of xrefs.
Identify all partners for an individual
get_indi_partners(x, xref)get_indi_partners(x, xref)
x |
A gedcom object. |
xref |
The xref of an Individual record. |
A character vector of xrefs.
Identify all siblings for an individual
get_indi_siblings(x, xref, pedigrees = NULL, inc_half = FALSE)get_indi_siblings(x, xref, pedigrees = NULL, inc_half = FALSE)
x |
A gedcom object. |
xref |
The xref of an Individual record. |
pedigrees |
A character vector of allowed family-child linkages. By default, NULL means all pedigrees (e.g. inc. ADOPTED). If it includes "BIRTH" then this will also pick up non-existent values (since BIRTH is assumed to be the default). |
inc_half |
Whether to include siblings that only share one parent. |
A character vector of xrefs.
Identify all records that contain a pattern
get_records_by_pattern(x, pattern, return_context = FALSE)get_records_by_pattern(x, pattern, return_context = FALSE)
x |
A gedcom object. |
pattern |
A regular expression. Case is ignored. |
return_context |
Whether to return a named list of matching lines in the GEDCOM (TRUE) or just the xrefs (FALSE, default). |
Either a vector of matching xrefs, or a named list of matching GEDCOM lines.
This function gets all supporting records (and onwards dependencies) for a set of records. Supporting records are note, multimedia, source, submitter and repository records, i.e. those providing supporting evidence and comments.
get_supporting_recs( x, xrefs, inc_note = TRUE, inc_media = TRUE, inc_sour = TRUE, inc_repo = TRUE, inc_subm = TRUE )get_supporting_recs( x, xrefs, inc_note = TRUE, inc_media = TRUE, inc_sour = TRUE, inc_repo = TRUE, inc_subm = TRUE )
x |
A gedcom object. |
xrefs |
The xrefs of records to get supporting records for. |
inc_note |
Whether to include Note records. |
inc_media |
Whether to include Multimedia records. |
inc_sour |
Whether to include Source records. |
inc_repo |
Whether to include Repository records. |
inc_subm |
Whether to include Submitter records. |
A character vector of xrefs.
This function identifies records that are not referenced in any other records.
get_unused_recs(x)get_unused_recs(x)
x |
A gedcom object. |
You would expect every record to be referenced by another in some way. For example, Individual records should reference Family records (and vice-versa), Repository records should be referenced by Source records, and Source records should be cited by other records.
A character vector of xrefs.
Create an individual attribute object
IndividualAttribute( fact_type = character(0), fact_val = character(0), fact_desc = character(0), date = character(0), place = NULL, address = NULL, phone_numbers = character(0), emails = character(0), faxes = character(0), web_pages = character(0), agency = character(0), relig_affil = character(0), cause = character(0), confidential = FALSE, locked = FALSE, private = FALSE, date_sort = character(0), associations = list(), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), unique_ids = character(0), age = character(0), age_phrase = character(0) )IndividualAttribute( fact_type = character(0), fact_val = character(0), fact_desc = character(0), date = character(0), place = NULL, address = NULL, phone_numbers = character(0), emails = character(0), faxes = character(0), web_pages = character(0), agency = character(0), relig_affil = character(0), cause = character(0), confidential = FALSE, locked = FALSE, private = FALSE, date_sort = character(0), associations = list(), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), unique_ids = character(0), age = character(0), age_phrase = character(0) )
fact_type |
A code indicating the type of fact. This must be taken from one of
|
fact_val |
A value associated with the fact. For example for "NCHI" this would
be the number of children. See |
fact_desc |
A further classification of the fact. This is required for generic
events or attributes. See |
date |
The date given either as a formatted GEDCOM string, or a
|
place |
The associated place. This can either be a
|
address |
The address given either as a |
phone_numbers |
A character vector of phone numbers. |
emails |
A character vector of email addresses. |
faxes |
A character vector of fax numbers. |
web_pages |
A character vector of web page URLs. |
agency |
The organization, institution, corporation, person, or other entity that has responsibility for the associated fact. Examples are an employer of a person of an associated occupation, or an educational establishment that has awarded a scholastic award. |
relig_affil |
A religious denomination associated with the fact. |
cause |
Used in special cases to record the reasons which precipitated the fact (e.g. cause of death). |
confidential |
A logical value indicating whether the associated record/fact should be treated as confidential. This allows them to be excluded on export. |
locked |
A logical value indicating whether the associated record/fact should be treated as read-only. |
private |
A logical value indicating whether the associated record/fact should be treated as private. This allows them to be excluded on export. |
date_sort |
The date given either as a formatted GEDCOM string, or a
|
associations |
Associated individuals. This can either be a |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
citations |
Associated sources. This can either be a |
media_links |
Associated multimedia. This can either be a |
unique_ids |
A character vector of enduring and globally-unique identifiers. These need
to be formatted in line with RFC 9562 and can be generated with |
age |
A character string that indicates the age in years, months, weeks and/or days that the individual was at the time of the fact. Any combination of these is permitted. It is recommended that this be an age from a cited source document. Any labels must come after their corresponding number, for example; "4y 8m 1w 3d". Age bounds can also be included, for example; "< 40y". If the age doesn't fit this format then describe the age in the corresponding phrase parameter. |
age_phrase |
Free text information that cannot be expressed in the individual's age. |
An S7 object representing a GEDCOM INDIVIDUAL_ATTRIBUTE_STRUCTURE.
Create an individual event object
IndividualEvent( fact_type = character(0), fact_val = character(0), fact_desc = character(0), date = character(0), place = NULL, address = NULL, phone_numbers = character(0), emails = character(0), faxes = character(0), web_pages = character(0), agency = character(0), relig_affil = character(0), cause = character(0), confidential = FALSE, locked = FALSE, private = FALSE, date_sort = character(0), associations = list(), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), unique_ids = character(0), age = character(0), age_phrase = character(0), fam_xref = character(0), adop_parent = character(0), adop_parent_phrase = character(0) )IndividualEvent( fact_type = character(0), fact_val = character(0), fact_desc = character(0), date = character(0), place = NULL, address = NULL, phone_numbers = character(0), emails = character(0), faxes = character(0), web_pages = character(0), agency = character(0), relig_affil = character(0), cause = character(0), confidential = FALSE, locked = FALSE, private = FALSE, date_sort = character(0), associations = list(), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), unique_ids = character(0), age = character(0), age_phrase = character(0), fam_xref = character(0), adop_parent = character(0), adop_parent_phrase = character(0) )
fact_type |
A code indicating the type of fact. This must be taken from one of
|
fact_val |
A value associated with the fact. For example for "NCHI" this would
be the number of children. See |
fact_desc |
A further classification of the fact. This is required for generic
events or attributes. See |
date |
The date given either as a formatted GEDCOM string, or a
|
place |
The associated place. This can either be a
|
address |
The address given either as a |
phone_numbers |
A character vector of phone numbers. |
emails |
A character vector of email addresses. |
faxes |
A character vector of fax numbers. |
web_pages |
A character vector of web page URLs. |
agency |
The organization, institution, corporation, person, or other entity that has responsibility for the associated fact. Examples are an employer of a person of an associated occupation, or an educational establishment that has awarded a scholastic award. |
relig_affil |
A religious denomination associated with the fact. |
cause |
Used in special cases to record the reasons which precipitated the fact (e.g. cause of death). |
confidential |
A logical value indicating whether the associated record/fact should be treated as confidential. This allows them to be excluded on export. |
locked |
A logical value indicating whether the associated record/fact should be treated as read-only. |
private |
A logical value indicating whether the associated record/fact should be treated as private. This allows them to be excluded on export. |
date_sort |
The date given either as a formatted GEDCOM string, or a
|
associations |
Associated individuals. This can either be a |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
citations |
Associated sources. This can either be a |
media_links |
Associated multimedia. This can either be a |
unique_ids |
A character vector of enduring and globally-unique identifiers. These need
to be formatted in line with RFC 9562 and can be generated with |
age |
A character string that indicates the age in years, months, weeks and/or days that the individual was at the time of the fact. Any combination of these is permitted. It is recommended that this be an age from a cited source document. Any labels must come after their corresponding number, for example; "4y 8m 1w 3d". Age bounds can also be included, for example; "< 40y". If the age doesn't fit this format then describe the age in the corresponding phrase parameter. |
age_phrase |
Free text information that cannot be expressed in the individual's age. |
fam_xref |
The cross-reference identifier of a family record. |
adop_parent |
The adopting parent. Must be a value from |
adop_parent_phrase |
A free text description of the adoptive parent (if the value itself is insufficient). |
An S7 object representing a GEDCOM INDIVIDUAL_EVENT_STRUCTURE.
Create an individual record object
IndividualRecord( XREF = "@GEDCOMS7_ORPHAN@", confidential = FALSE, locked = FALSE, private = FALSE, user_ids = character(0), unique_ids = character(0), ext_ids = character(0), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), created = NULL, updated = NULL, pers_names = list(), sex = "U", facts = list(), non_events = list(), ordinances = list(), fam_links_chil = list(), fam_links_spou = list(), subm_xrefs = character(0), associations = list(), alia_xrefs = character(0), anci_xrefs = character(0), desi_xrefs = character(0) )IndividualRecord( XREF = "@GEDCOMS7_ORPHAN@", confidential = FALSE, locked = FALSE, private = FALSE, user_ids = character(0), unique_ids = character(0), ext_ids = character(0), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), created = NULL, updated = NULL, pers_names = list(), sex = "U", facts = list(), non_events = list(), ordinances = list(), fam_links_chil = list(), fam_links_spou = list(), subm_xrefs = character(0), associations = list(), alia_xrefs = character(0), anci_xrefs = character(0), desi_xrefs = character(0) )
XREF |
The cross-reference identifier for this record. You should not edit this at all as maintenance of these is done automatically. |
confidential |
A logical value indicating whether the associated record/fact should be treated as confidential. This allows them to be excluded on export. |
locked |
A logical value indicating whether the associated record/fact should be treated as read-only. |
private |
A logical value indicating whether the associated record/fact should be treated as private. This allows them to be excluded on export. |
user_ids |
A character vector of user-generated identifiers. The type of the identifiers can be given in the vector names, e.g. c("Driving license number" = "ABC123") |
unique_ids |
A character vector of enduring and globally-unique identifiers. These need
to be formatted in line with RFC 9562 and can be generated with |
ext_ids |
A named character vector of identifiers maintained by an external authority. The names must be given as a URI. See the GEDCOM specification for more information. |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
citations |
Associated sources. This can either be a |
media_links |
Associated multimedia. This can either be a |
created |
A |
updated |
A |
pers_names |
A |
sex |
The sex of the individual. Either "M" (male), "F" (female), "X" (other), or "U" (undetermined, the default). |
facts |
Events and/or attributes for this individual.
An |
non_events |
Events that this individual did not experience.
A |
ordinances |
An |
fam_links_chil |
A |
fam_links_spou |
A |
subm_xrefs |
A character vector of relevant submitter record cross-reference identifiers. |
associations |
Associated individuals. This can either be a |
alia_xrefs |
A named character vector of relevant individual record cross-reference identifiers whose records also represent this individual. The vector names may provide a description of these records. |
anci_xrefs |
A character vector of relevant submitter record cross-reference identifiers who are interested in the ancestors of this individual. |
desi_xrefs |
A character vector of relevant submitter record cross-reference identifiers who are interested in the descendants of this individual. |
An S7 object representing a GEDCOM INDIVIDUAL_RECORD.
Create a media file object
MediaFile( location = character(0), title = character(0), media_type = character(0), medium = character(0), medium_phrase = character(0), media_alt = character(0) )MediaFile( location = character(0), title = character(0), media_type = character(0), medium = character(0), medium_phrase = character(0), media_alt = character(0) )
location |
An absolute or relative URL to the file. |
title |
The title of the multimedia record. |
media_type |
The media type as defined in RFC 2045. |
medium |
A value from |
medium_phrase |
A free text description of the medium. This is mandatory if |
media_alt |
A named vector of the media in alternative media forms, c(form = location) |
An S7 object representing a GEDCOM multimedia file substructure.
Create a multimedia link object
MediaLink( media_xref = "@VOID@", title = character(0), top = integer(0), left = integer(0), height = integer(0), width = integer(0) )MediaLink( media_xref = "@VOID@", title = character(0), top = integer(0), left = integer(0), height = integer(0), width = integer(0) )
media_xref |
The cross-reference identifier of a multimedia record. |
title |
The title of the multimedia record. |
top |
The number of pixels to omit from the top side of the image. |
left |
The number of pixels to omit from the left side of the image. |
height |
The height in pixels of the cropped region. |
width |
The width in pixels of the cropped region. |
The properties @left and @top indicate the top left corner of the region to display. The properties @width and @height indicate the dimensions of the region to display.
If the multimedia record contains multiple files, then the crop parameters only applies to the first file.
An S7 object representing a GEDCOM MULTIMEDIA_LINK.
Create a multimedia record object
MediaRecord( XREF = "@GEDCOMS7_ORPHAN@", confidential = FALSE, locked = FALSE, private = FALSE, user_ids = character(0), unique_ids = character(0), ext_ids = character(0), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), created = NULL, updated = NULL, files = list() )MediaRecord( XREF = "@GEDCOMS7_ORPHAN@", confidential = FALSE, locked = FALSE, private = FALSE, user_ids = character(0), unique_ids = character(0), ext_ids = character(0), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), created = NULL, updated = NULL, files = list() )
XREF |
The cross-reference identifier for this record. You should not edit this at all as maintenance of these is done automatically. |
confidential |
A logical value indicating whether the associated record/fact should be treated as confidential. This allows them to be excluded on export. |
locked |
A logical value indicating whether the associated record/fact should be treated as read-only. |
private |
A logical value indicating whether the associated record/fact should be treated as private. This allows them to be excluded on export. |
user_ids |
A character vector of user-generated identifiers. The type of the identifiers can be given in the vector names, e.g. c("Driving license number" = "ABC123") |
unique_ids |
A character vector of enduring and globally-unique identifiers. These need
to be formatted in line with RFC 9562 and can be generated with |
ext_ids |
A named character vector of identifiers maintained by an external authority. The names must be given as a URI. See the GEDCOM specification for more information. |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
citations |
Associated sources. This can either be a |
media_links |
Not used. |
created |
A |
updated |
A |
files |
A |
An S7 object representing a GEDCOM MULTIMEDIA_RECORD.
Create a new GEDCOM object
new_gedcom(my_language = "en")new_gedcom(my_language = "en")
my_language |
The primary language in which data will be stored. The language code should adhere to BCP 47. |
See documentation for GedcomS7() and GedcomSource() for object properties.
A minimal gedcom S7 object.
Create a non-event object
NonEvent( event_type = character(0), date_period = character(0), date_phrase = character(0), note_xrefs = character(0), notes = list(), citations = list() )NonEvent( event_type = character(0), date_period = character(0), date_phrase = character(0), note_xrefs = character(0), notes = list(), citations = list() )
event_type |
A code indicating the type of event that didn't happen.
This must be taken from |
date_period |
A date period given either as a formatted GEDCOM string, or a
|
date_phrase |
Textual information that cannot be expressed in the date. |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
citations |
Associated sources. This can either be a |
An S7 object representing a GEDCOM NON_EVENT_STRUCTURE.
Create a note structure object
Note( text = character(0), language = character(0), media_type = character(0), translations = list(), citations = list() )Note( text = character(0), language = character(0), media_type = character(0), translations = list(), citations = list() )
text |
A character string. New lines are created with \n. |
language |
A character string of language tags as defined in BCP 47. |
media_type |
The media type as defined in RFC 2045. |
translations |
A |
citations |
Associated sources. This can either be a |
The shared note (SNOTE) alternative of this structure is defined separately in relevant structures.
An S7 object representing a GEDCOM NOTE_STRUCTURE.
Create a shared note record object
NoteRecord( XREF = "@GEDCOMS7_ORPHAN@", confidential = FALSE, locked = FALSE, private = FALSE, user_ids = character(0), unique_ids = character(0), ext_ids = character(0), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), created = NULL, updated = NULL, text = character(0), media_type = character(0), language = character(0), translations = list() )NoteRecord( XREF = "@GEDCOMS7_ORPHAN@", confidential = FALSE, locked = FALSE, private = FALSE, user_ids = character(0), unique_ids = character(0), ext_ids = character(0), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), created = NULL, updated = NULL, text = character(0), media_type = character(0), language = character(0), translations = list() )
XREF |
The cross-reference identifier for this record. You should not edit this at all as maintenance of these is done automatically. |
confidential |
A logical value indicating whether the associated record/fact should be treated as confidential. This allows them to be excluded on export. |
locked |
A logical value indicating whether the associated record/fact should be treated as read-only. |
private |
A logical value indicating whether the associated record/fact should be treated as private. This allows them to be excluded on export. |
user_ids |
A character vector of user-generated identifiers. The type of the identifiers can be given in the vector names, e.g. c("Driving license number" = "ABC123") |
unique_ids |
A character vector of enduring and globally-unique identifiers. These need
to be formatted in line with RFC 9562 and can be generated with |
ext_ids |
A named character vector of identifiers maintained by an external authority. The names must be given as a URI. See the GEDCOM specification for more information. |
note_xrefs |
Not used. |
notes |
Not used. |
citations |
Associated sources. This can either be a |
media_links |
Not used. |
created |
A |
updated |
A |
text |
A character string. New lines are created with \n. |
media_type |
The media type as defined in RFC 2045. |
language |
A character string of language tags as defined in BCP 47. |
translations |
A |
An S7 object representing a GEDCOM SHARED_NOTE_RECORD.
Create an individual ordinance object
Ordinance( ord_type = character(0), date = character(0), temple_name = character(0), place = NULL, ord_state = character(0), state_date = character(0), state_time = character(0), note_xrefs = character(0), notes = list(), citations = list(), fam_xref = character(0) )Ordinance( ord_type = character(0), date = character(0), temple_name = character(0), place = NULL, ord_state = character(0), state_date = character(0), state_time = character(0), note_xrefs = character(0), notes = list(), citations = list(), fam_xref = character(0) )
ord_type |
A value from |
date |
The date given either as a formatted GEDCOM string, or a
|
temple_name |
The name of a temple of The Church of Jesus Christ of Latter-day Saints. |
place |
The associated place. This can either be a
|
ord_state |
An optional value from |
state_date |
The ordinance date given either as a formatted GEDCOM string, or a
|
state_time |
The ordinance time given either as a formatted GEDCOM string, or a
|
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
citations |
Associated sources. This can either be a |
fam_xref |
The cross-reference identifier of a family record. |
An S7 object representing a GEDCOM LDS_INDIVIDUAL_ORDINANCE.
Convert a GEDCOM age at event into decimalised years
parse_gedcom_age(age_string)parse_gedcom_age(age_string)
age_string |
A string describing an age at an event, e.g. "14y 3m 1w 2d". |
A numeric value giving the age in years.
Convert a GEDCOM date into a date object
parse_gedcom_date(date_string, minimise = TRUE)parse_gedcom_date(date_string, minimise = TRUE)
date_string |
A GEDCOM date value string. |
minimise |
Whether to fill in missing date pieces so that the date is minimised. For example, if no month is given, January is used. If minimise = FALSE, December will be used. |
A date.
Create a personal name object
PersonalName( pers_name = character(0), name_type = character(0), type_phrase = character(0), name_pieces = NULL, name_translations = list(), notes = list(), note_xrefs = character(0), citations = list() )PersonalName( pers_name = character(0), name_type = character(0), type_phrase = character(0), name_pieces = NULL, name_translations = list(), notes = list(), note_xrefs = character(0), citations = list() )
pers_name |
The full name of the individual. Surnames should be enclosed in forward slashes. |
name_type |
An optional name type taken from |
type_phrase |
An optional free text description of the name type. This is required if the name type is "OTHER". |
name_pieces |
A |
name_translations |
A |
notes |
Associated notes. This can either be a |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
citations |
Associated sources. This can either be a |
An S7 object representing a GEDCOM PERSONAL_NAME_STRUCTURE.
Create a name pieces object
PersonalNamePieces( prefix = character(0), given = character(0), nickname = character(0), surname_prefix = character(0), surname = character(0), suffix = character(0) )PersonalNamePieces( prefix = character(0), given = character(0), nickname = character(0), surname_prefix = character(0), surname = character(0), suffix = character(0) )
prefix |
The name prefix, e.g. Cmdr. |
given |
The given name or earned name. |
nickname |
A descriptive or familiar name that is used instead of, or in addition to, one’s proper name. |
surname_prefix |
Surname prefix or article used in a family name. For example in the name "de la Cruz", this value would be "de la". |
surname |
Surname or family name. |
suffix |
Name piece that appears after the given name and surname parts, e.g. Jr. |
An S7 object representing a GEDCOM PERSONAL_NAME_PIECES.
Create a name translation object
PersonalNameTran( pers_name = character(0), language = character(0), name_pieces = NULL )PersonalNameTran( pers_name = character(0), language = character(0), name_pieces = NULL )
pers_name |
The full name of the individual. Surnames should be enclosed in forward slashes. |
language |
A character string of language tags as defined in BCP 47. |
name_pieces |
A |
An S7 object representing a GEDCOM personal name translation substructure.
Create a place structure object
Place( place_name = character(0), place_form = character(0), language = character(0), place_translations = character(0), lat_long = character(0), ext_ids = character(0), note_xrefs = character(0), notes = list() )Place( place_name = character(0), place_form = character(0), language = character(0), place_translations = character(0), lat_long = character(0), ext_ids = character(0), note_xrefs = character(0), notes = list() )
place_name |
A comma-separated string of region names, ordered from smallest to
largest. The specific meaning of each element is given by the @place_form, or in the
|
place_form |
A comma-separated string of jurisdictional titles, which has the same number of elements as @place_form. For example "City, County, State, Country". |
language |
A character string of language tags as defined in BCP 47. |
place_translations |
A named character vector of translations of the place name. The vector values must follow the same form as the @place_name and the vector names must be a language value as defined by @language. |
lat_long |
The latitude and longitude of the place, separated by a space. The latitude coordinate is the direction North or South from the equator in degrees and fraction of degrees. The longitude coordinate is in degrees and fraction of degrees East or West of the zero or base meridian coordinate. For example: 18 degrees, 9 minutes, and 3.4 seconds North, 168 degrees, 9 minutes, and 3.4 seconds East would be formatted as "N18.150944 E168.150944". |
ext_ids |
A named character vector of identifiers maintained by an external authority. The names must be given as a URI. See the GEDCOM specification for more information. |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
An S7 object representing a GEDCOM PLACE_STRUCTURE.
Pull a record from a GEDCOM object for editing
pull_record(x, xref)pull_record(x, xref)
x |
A gedcom object. |
xref |
The xref of the record to pull. |
The record is not removed from the gedcom object, rather a copy is taken.
An S7 object representing the record.
Push an edited record back into a GEDCOM object
push_record(x, record)push_record(x, record)
x |
A gedcom object. |
record |
An object representing the record to place back into the GEDCOM object. |
The function will automatically keep family links for individuals updated.
It will also update the @updated property if @update_change_dates in the
gedcom object is set to TRUE.
An updated GEDCOM object.
Imports a *.ged file and creates a gedcom object.
read_gedcom(filepath = NULL, lines = NULL)read_gedcom(filepath = NULL, lines = NULL)
filepath |
The full filepath of the GEDCOM file. If this and the |
lines |
If the filepath is not provided then a character vector of GEDCOM lines can be provided. |
A gedcom S7 object.
Create a repository citation object
RepositoryCitation( repo_xref = "@VOID@", notes = list(), note_xrefs = character(0), call_numbers = list() )RepositoryCitation( repo_xref = "@VOID@", notes = list(), note_xrefs = character(0), call_numbers = list() )
repo_xref |
The cross-reference identifier of a repository record. If the repository does not have a record, then this can be left blank and a void xref will be used. However, you should describe the repository in @notes. |
notes |
Associated notes. This can either be a |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
call_numbers |
Call number(s) used to file and retrieve items from the repository.
This can either be a |
An S7 object representing a GEDCOM SOURCE_REPOSITORY_CITATION.
Create a repository record object
RepositoryRecord( XREF = "@GEDCOMS7_ORPHAN@", confidential = FALSE, locked = FALSE, private = FALSE, user_ids = character(0), unique_ids = character(0), ext_ids = character(0), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), created = NULL, updated = NULL, repo_name = character(0), address = NULL, phone_numbers = character(0), emails = character(0), faxes = character(0), web_pages = character(0) )RepositoryRecord( XREF = "@GEDCOMS7_ORPHAN@", confidential = FALSE, locked = FALSE, private = FALSE, user_ids = character(0), unique_ids = character(0), ext_ids = character(0), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), created = NULL, updated = NULL, repo_name = character(0), address = NULL, phone_numbers = character(0), emails = character(0), faxes = character(0), web_pages = character(0) )
XREF |
The cross-reference identifier for this record. You should not edit this at all as maintenance of these is done automatically. |
confidential |
A logical value indicating whether the associated record/fact should be treated as confidential. This allows them to be excluded on export. |
locked |
A logical value indicating whether the associated record/fact should be treated as read-only. |
private |
A logical value indicating whether the associated record/fact should be treated as private. This allows them to be excluded on export. |
user_ids |
A character vector of user-generated identifiers. The type of the identifiers can be given in the vector names, e.g. c("Driving license number" = "ABC123") |
unique_ids |
A character vector of enduring and globally-unique identifiers. These need
to be formatted in line with RFC 9562 and can be generated with |
ext_ids |
A named character vector of identifiers maintained by an external authority. The names must be given as a URI. See the GEDCOM specification for more information. |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
citations |
Not used. |
media_links |
Not used. |
created |
A |
updated |
A |
repo_name |
The name of the repository. |
address |
The address given either as a |
phone_numbers |
A character vector of phone numbers. |
emails |
A character vector of email addresses. |
faxes |
A character vector of fax numbers. |
web_pages |
A character vector of web page URLs. |
An S7 object representing a GEDCOM REPOSITORY_RECORD.
Remove living individuals in a GEDCOM object
rm_living(x, max_age = 100)rm_living(x, max_age = 100)
x |
A gedcom object. |
max_age |
The maximum age to assume for a living person (if a date of birth is given). |
A gedcom object cleansed of information on living individuals.
Remove records from a GEDCOM object
rm_records(x, xrefs, void_refs = TRUE)rm_records(x, xrefs, void_refs = TRUE)
x |
A gedcom object. |
xrefs |
A character vector of xrefs to remove. |
void_refs |
Whether to replace references to this record with a @VOID@ reference. This indicates to people that there was a reference to a record here. Note that if this is set to FALSE, you risk losing supplementary information (e.g. pedigree data in family links). |
The gedcom object with the records removed.
Create a source call number object
SourceCallNumber( call_number = character(0), medium = character(0), medium_phrase = character(0) )SourceCallNumber( call_number = character(0), medium = character(0), medium_phrase = character(0) )
call_number |
The call number. |
medium |
A value from |
medium_phrase |
A free text description of the medium. This is mandatory if |
An S7 object representing the CALN substructure of a GEDCOM SOURCE_REPOSITORY_CITATION.
Create a source citation object
SourceCitation( sour_xref = "@VOID@", where = character(0), date = character(0), source_text = list(), fact_type = character(0), fact_phrase = character(0), role = character(0), role_phrase = character(0), certainty = character(0), media_links = list(), note_xrefs = character(0), notes = list() )SourceCitation( sour_xref = "@VOID@", where = character(0), date = character(0), source_text = list(), fact_type = character(0), fact_phrase = character(0), role = character(0), role_phrase = character(0), certainty = character(0), media_links = list(), note_xrefs = character(0), notes = list() )
sour_xref |
The cross-reference identifier of a source record. If the source does not have a record, then this can be left blank and a void xref will be used. However, you should describe the source in @where. |
where |
A specific location within the information referenced. For a published work, this could include the volume of a multi-volume work and the page number or numbers. For a periodical, it could include volume, issue, and page numbers. For a newspaper, it could include a date, page number, and column number. For an unpublished source or micro‐ filmed works, this could be a film or sheet number, page number, or frame number. A census record might have an enumerating district, page number, line number, dwelling number, and family number. It is recommended that the data in this field be formatted comma-separated with label: value pairs |
date |
The date given either as a formatted GEDCOM string, or a
|
source_text |
A verbatim copy of any description contained within the source. This can
either be a |
fact_type |
A code indicating the type of fact. This must be taken from one of
|
fact_phrase |
Textual information that cannot be expressed in the fact type. |
role |
What role this person played in this fact. |
role_phrase |
Textual information that cannot be expressed in the role. |
certainty |
An enumerated value indicating the credibility of a piece of information, based on its supporting evidence. Some systems use this feature to rank multiple conflicting opinions for display of most likely information first. It is not intended to eliminate the receivers’ need to evaluate the evidence for themselves. "0" = unreliable/estimated data "1" = Questionable reliability of evidence "2" = Secondary evidence, data officially recorded sometime after event "3" = Direct and primary evidence used, or by dominance of the evidence |
media_links |
Associated multimedia. This can either be a |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
An S7 object representing a GEDCOM SOURCE_CITATION.
Create a source record object
SourceRecord( XREF = "@GEDCOMS7_ORPHAN@", confidential = FALSE, locked = FALSE, private = FALSE, user_ids = character(0), unique_ids = character(0), ext_ids = character(0), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), created = NULL, updated = NULL, facts_recorded = list(), agency = character(0), data_note_xrefs = character(0), data_notes = list(), originator = character(0), full_title = character(0), short_title = character(0), publication_facts = character(0), source_text = list(), repo_citations = list() )SourceRecord( XREF = "@GEDCOMS7_ORPHAN@", confidential = FALSE, locked = FALSE, private = FALSE, user_ids = character(0), unique_ids = character(0), ext_ids = character(0), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), created = NULL, updated = NULL, facts_recorded = list(), agency = character(0), data_note_xrefs = character(0), data_notes = list(), originator = character(0), full_title = character(0), short_title = character(0), publication_facts = character(0), source_text = list(), repo_citations = list() )
XREF |
The cross-reference identifier for this record. You should not edit this at all as maintenance of these is done automatically. |
confidential |
A logical value indicating whether the associated record/fact should be treated as confidential. This allows them to be excluded on export. |
locked |
A logical value indicating whether the associated record/fact should be treated as read-only. |
private |
A logical value indicating whether the associated record/fact should be treated as private. This allows them to be excluded on export. |
user_ids |
A character vector of user-generated identifiers. The type of the identifiers can be given in the vector names, e.g. c("Driving license number" = "ABC123") |
unique_ids |
A character vector of enduring and globally-unique identifiers. These need
to be formatted in line with RFC 9562 and can be generated with |
ext_ids |
A named character vector of identifiers maintained by an external authority. The names must be given as a URI. See the GEDCOM specification for more information. |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
citations |
Not used. |
media_links |
Associated multimedia. This can either be a |
created |
A |
updated |
A |
facts_recorded |
The facts recorded by the source. This can either be a |
agency |
The organization, institution, corporation, person, or other entity that has responsibility for the associated fact. Examples are an employer of a person of an associated occupation, or an educational establishment that has awarded a scholastic award. |
data_note_xrefs |
A character vector of note record cross-reference identifiers relevant to the source data. |
data_notes |
Associated notes about the source data. This can either be a |
originator |
The person, agency, or entity who created the record. For a published work, this could be the author, compiler, transcriber, abstractor, or editor. For an unpublished source, this may be an individual, a government agency, church organization, or private organization. |
full_title |
The full title of the source. |
short_title |
A shortened name of the source used for sorting, filing, and retrieving records. |
publication_facts |
When and where the record was created. For published works, this includes information such as the city of publication, name of the publisher, and year of publication. |
source_text |
A verbatim copy of any description contained within the source. This can
either be a |
repo_citations |
Associated repositories. This can either be a |
An S7 object representing a GEDCOM SOURCE_RECORD.
Create a spouse sealing object
SpouseSealing( date = character(0), temple_name = character(0), place = NULL, ord_state = character(0), state_date = character(0), state_time = character(0), note_xrefs = character(0), notes = list(), citations = list() )SpouseSealing( date = character(0), temple_name = character(0), place = NULL, ord_state = character(0), state_date = character(0), state_time = character(0), note_xrefs = character(0), notes = list(), citations = list() )
date |
The date given either as a formatted GEDCOM string, or a
|
temple_name |
The name of a temple of The Church of Jesus Christ of Latter-day Saints. |
place |
The associated place. This can either be a
|
ord_state |
An optional value from |
state_date |
The ordinance date given either as a formatted GEDCOM string, or a
|
state_time |
The ordinance time given either as a formatted GEDCOM string, or a
|
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
citations |
Associated sources. This can either be a |
An S7 object representing a GEDCOM LDS_SPOUSE_SEALING.
Create a submitter record object
SubmitterRecord( XREF = "@GEDCOMS7_ORPHAN@", confidential = FALSE, locked = FALSE, private = FALSE, user_ids = character(0), unique_ids = character(0), ext_ids = character(0), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), created = NULL, updated = NULL, subm_name = character(0), address = NULL, phone_numbers = character(0), emails = character(0), faxes = character(0), web_pages = character(0), languages = character(0) )SubmitterRecord( XREF = "@GEDCOMS7_ORPHAN@", confidential = FALSE, locked = FALSE, private = FALSE, user_ids = character(0), unique_ids = character(0), ext_ids = character(0), note_xrefs = character(0), notes = list(), citations = list(), media_links = list(), created = NULL, updated = NULL, subm_name = character(0), address = NULL, phone_numbers = character(0), emails = character(0), faxes = character(0), web_pages = character(0), languages = character(0) )
XREF |
The cross-reference identifier for this record. You should not edit this at all as maintenance of these is done automatically. |
confidential |
A logical value indicating whether the associated record/fact should be treated as confidential. This allows them to be excluded on export. |
locked |
A logical value indicating whether the associated record/fact should be treated as read-only. |
private |
A logical value indicating whether the associated record/fact should be treated as private. This allows them to be excluded on export. |
user_ids |
A character vector of user-generated identifiers. The type of the identifiers can be given in the vector names, e.g. c("Driving license number" = "ABC123") |
unique_ids |
A character vector of enduring and globally-unique identifiers. These need
to be formatted in line with RFC 9562 and can be generated with |
ext_ids |
A named character vector of identifiers maintained by an external authority. The names must be given as a URI. See the GEDCOM specification for more information. |
note_xrefs |
A character vector of relevant note record cross-reference identifiers. |
notes |
Associated notes. This can either be a |
citations |
Not used. |
media_links |
Associated multimedia. This can either be a |
created |
A |
updated |
A |
subm_name |
The name of the submitter. |
address |
The address given either as a |
phone_numbers |
A character vector of phone numbers. |
emails |
A character vector of email addresses. |
faxes |
A character vector of fax numbers. |
web_pages |
A character vector of web page URLs. |
languages |
A character vector of language tags as defined in BCP 47. |
An S7 object representing a GEDCOM SUBMITTER_RECORD.
Create a time object
Time( hour = integer(0), minute = integer(0), second = integer(0), fraction = integer(0), utc = TRUE )Time( hour = integer(0), minute = integer(0), second = integer(0), fraction = integer(0), utc = TRUE )
hour |
The hour of the day given as an integer between 0 and 23. |
minute |
The minute of the hour given as an integer between 0 and 59. |
second |
The second of the minute given as an integer between 0 and 59. |
fraction |
The fraction of the second given as an integer. |
utc |
Whether the time is in Coordinated Universal Time (UTC) (TRUE, the default) or is in local time (FALSE). |
An S7 object representing a GEDCOM time.
Create a text translation object
TranslationText( text = character(0), language = character(0), media_type = character(0) )TranslationText( text = character(0), language = character(0), media_type = character(0) )
text |
A character string. New lines are created with \n. |
language |
A character string of language tags as defined in BCP 47. |
media_type |
The media type as defined in RFC 2045. |
An S7 object representing a GEDCOM text translation substructure.
Lookup values
val_record_types() val_adoptive_parents() val_individual_attribute_types(inc_generic = FALSE) val_individual_event_types(inc_generic = FALSE) val_family_event_types(inc_generic = FALSE) val_family_attribute_types(inc_generic = FALSE) val_event_types(inc_generic = FALSE) val_attribute_types(inc_generic = FALSE) val_fact_types(inc_generic = FALSE) val_individual_ordinance_types() val_family_ordinance_types() val_ordinance_states(ord_type) val_medium_types() val_pedigree_types() val_certainty() val_restriction() val_roles() val_sexes() val_confidence_types() val_name_types()val_record_types() val_adoptive_parents() val_individual_attribute_types(inc_generic = FALSE) val_individual_event_types(inc_generic = FALSE) val_family_event_types(inc_generic = FALSE) val_family_attribute_types(inc_generic = FALSE) val_event_types(inc_generic = FALSE) val_attribute_types(inc_generic = FALSE) val_fact_types(inc_generic = FALSE) val_individual_ordinance_types() val_family_ordinance_types() val_ordinance_states(ord_type) val_medium_types() val_pedigree_types() val_certainty() val_restriction() val_roles() val_sexes() val_confidence_types() val_name_types()
inc_generic |
Whether to include a generic facts. |
ord_type |
One of the values in |
A vector of allowed values.
Save a gedcom object to disk as a GEDCOM file
write_gedcom( gedcom, filepath = file.choose(), inc_confid = TRUE, inc_private = TRUE, inc_living = TRUE )write_gedcom( gedcom, filepath = file.choose(), inc_confid = TRUE, inc_private = TRUE, inc_living = TRUE )
gedcom |
A gedcom object. |
filepath |
The full filepath to write to. |
inc_confid |
Whether to include records that are marked as confidential. |
inc_private |
Whether to include records that are marked as private. |
inc_living |
Whether to include individual records for suspected living people. |
This function prepares the gedcom object and then writes it to the filepath. Steps taken include filtering sensitive data, escaping "@" signs (with another "@") , and splitting long lines onto separate lines.
Writing to GEDzip files is not supported. If you want to do this then write to a GEDCOM file first and then move the file to the GEDzip archive.
The filepath (invisibly).