getDateErrorsAndConvertDatesInPed {nprcgenekeepr} | R Documentation |
Converts columns of dates in text form to Date
object columns
Description
Finds date errors in columns defined in
convertDate
as dates and converts date strings to Date
objects.
Usage
getDateErrorsAndConvertDatesInPed(sb, errorLst)
Arguments
sb |
A dataframe containing a table of pedigree and demographic information. |
errorLst |
object with placeholders for error types found in a pedigree
file by |
Details
If there are no errors that prevent the calculation of exit dates, they are calculated and added to the pedigree otherwise the pedigree is not updated.
Value
A list with the pedigree, sb
, and the errorLst
with
invalid date rows (errorLst$invalidDateRows
)
Examples
library(nprcgenekeepr)
ped <- nprcgenekeepr::pedInvalidDates
ped
errorLst <- getEmptyErrorLst()
colNamesAndErrors <- fixColumnNames(names(ped), errorLst)
names(ped) <- colNamesAndErrors$newColNames
pedAndErrors <- getDateErrorsAndConvertDatesInPed(ped, errorLst)
pedAndErrors$sb
pedAndErrors$errorLst
[Package nprcgenekeepr version 1.0.7 Index]