obfuscateDate {nprcgenekeepr} | R Documentation |
obfucateDate adds a random number of days bounded by plus and minus max delta
Description
Get the base_date add a random number of days taken from a uniform distribution bounded by -max_delta and max_delta. Insure the resulting date is as least as large as the min_date.
Usage
obfuscateDate(baseDate, maxDelta = 30L, minDate)
Arguments
baseDate |
list of Date objects with dates to be obfuscated |
maxDelta |
integer vector that is used to create min and max arguments
to |
minDate |
list object of Date objects that has the lower bound of resulting obfuscated dates |
Value
A vector of dates that have be obfuscated.
Examples
library(nprcgenekeepr)
someDates <- rep(
as.Date(c("2009-2-16", "2016-2-16"), format = "%Y-%m-%d"),
10
)
minBirthDate <- rep(as.Date("2009-2-16", format = "%Y-%m-%d"), 20)
obfuscateDate(someDates, 30, minBirthDate)
[Package nprcgenekeepr version 1.0.7 Index]