check_unique_animal_id: Check for uniqueness of Animal-IDs in a pedigree

Description Usage Arguments Value Examples

View source: R/pedigree_consistency_checks_tbl_df.R

Description

Given a pedigree in tbl_df-format, we have to make sure that identifiers of animals (animal-IDs) are unique. This follows from the general definition of a pedigree and it is also required, because we want to use the column as a primary key of the animal's pedigree record.

Usage

1
check_unique_animal_id(ptbl_pedigree, pn_ani_id_col_idx, pb_out)

Arguments

ptbl_pedigree

pedigree in tbl_df format

pn_ani_id_col_idx

column index for animal-ID in pedigree

pb_out

flag whether debugging output should be written

Value

tbl_rec_result tbl_df with non-unique IDs and number of occurences

Examples

1
2
3
4
s_data_file <- system.file(file.path("extdata","KLDAT_20170524_10000.txt"),
                           package = "PedigreeFromTvdData")
tbl_ped <- PedigreeFromTvdData::laf_open_fwf_tvd_input(ps_input_file = s_data_file)
PedigreeFromTvdData::check_unique_animal_id(ptbl_pedigree = tbl_ped)

pvrqualitasag/PedigreeFromTvdData documentation built on May 29, 2019, 7:50 a.m.