rdate {cleaner} | R Documentation |
Generate random dates
Description
This function provides random date generation with a specified range, that defaults to the beginning and end of the current year.
Usage
rdate(
n,
min = paste0(format(Sys.Date(), "%Y"), "-01-01"),
max = paste0(format(Sys.Date(), "%Y"), "-12-31"),
...
)
Arguments
n |
number of observations. If |
min , max |
lower and upper limits of the distribution. Must be (coercible to) valid dates. |
... |
parameters given to |
Examples
# generate a million random dates and check the distribution
hist(rdate(1000000), breaks = "months")
[Package cleaner version 1.5.4 Index]