get_random_dates: Generate a random sample of dates in a given range

Description Usage Arguments Value Examples

View source: R/create_dummy_data.R

Description

Generate a random sample of dates in a given range

Usage

1
2
3
4
5
get_random_dates(
  number_of_patients = 100,
  from = today() - months(3),
  to = today() + months(3)
)

Arguments

number_of_patients

The number of patients in the dataset (default=100)

from

Start date for random date range (default is 3 months ago)

to

End date for random date range (default is 3 months in the future)

Value

a list of random dates in the given range

Examples

1
2
get_random_dates(10)
get_random_dates(100,as.Date("2000-01-01"),as.Date( "2000-12-31"))

LisaHopcroft/CTutils documentation built on Oct. 7, 2021, 11:08 p.m.