random.Date | R Documentation |
random.Date()
is a function that randomly creates a vector of dates at a specified sample size between a specified date and a date.
age.cal()
is a function that calculates the number of years (age by default), months, and days from a specified date to a specified date.
random.Date(
from,
to = Sys.Date(),
size,
replace = FALSE,
prob = NULL,
by = "day"
)
age.cal(from, to = Sys.Date(), by = "year")
from |
starting date. Required. |
to |
end date.Optional. Optional. Default is today ( |
size |
a non-negative integer giving the number of items to choose. |
replace |
should sampling be with replacement? |
prob |
a vector of probability weights for obtaining the elements of the vector being sampled. |
by |
increment of the sequence. |
A vector of class "Date".
Date
, seq.Date
, sample
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.