R/pedigree_output.R

Defines functions output

Documented in output

###
###
###
###   Purpose:   Output Pedigree from TVD-Data
###   started:   2017-11-07 (skn and pvr)
###
### ######################################### ###


#' Output Pedigree from TVD-Data
#'
#' @param plPedigree processed Pedigree
#' @param psOutfile output Pedigree
#' @param psSepChar  parameter by default for delimiter symbol
#' @export output
output <- function(plPedigree, psOutfile, psSepChar = "\t"){
  ### # initialize result
  for(idxPed in 1:length(plPedigree)){
    lCurrentAni <- plPedigree[[idxPed]]
    cat(plPedigree[[lCurrentAni$TierId]]$TierId, psSepChar,
        plPedigree[[lCurrentAni$TierId]]$VaterId, psSepChar,
        plPedigree[[lCurrentAni$TierId]]$MutterId, psSepChar,
        plPedigree[[lCurrentAni$TierId]]$Geburtsdatum,"\n",
        file = psOutfile,
        append = TRUE)
  }
  return(invisible(TRUE))
}
pvrqualitasag/PedigreeFromTvdData documentation built on May 29, 2019, 7:50 a.m.