chooseDate | R Documentation |
earlier
flag.Part of Pedigree Curation
chooseDate(d1, d2, earlier = TRUE)
d1 |
|
d2 |
|
earlier |
logical variable with |
Given two dates, one is selected to be returned based on whether
it occurred earlier or later than the other. NAs
are ignored if
possible.
Date
vector of chosen dates or NA
where neither
is provided
library(nprcgenekeepr)
someDates <- lubridate::mdy(paste0(sample(1:12, 2, replace = TRUE), "-",
sample(1:28, 2, replace = TRUE), "-",
sample(seq(0, 15, by = 3), 2,
replace = TRUE) + 2000))
someDates
chooseDate(someDates[1], someDates[2], earlier = TRUE)
chooseDate(someDates[1], someDates[2], earlier = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.