Description Usage Arguments Value Functions
Predicate functions must take a year, month, and day integer as its parameters, and return TRUE if the date is valid. Allows one to construct complex date restrictions, such as only generating dates that are Mondays, etc.
1 2 3 | is_monday(y, m, d)
null_predicate(y, m, d)
|
y |
Integer. Candidate year. |
m |
Integer. Candidate month. |
d |
Integer. Candidate day. |
TRUE
if the date is valid, and FALSE
if it is not and
should be resampled.
is_monday
: An example predicate function that can be passed to
sample_date
so that it will return only those dates that fall
on Mondays.
null_predicate
: Always returns TRUE. This is the default predicate used
by sample_date
. Used when initially checking values so that
the supplied predicate never rejects a starting condition out-of-hand.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.