Learn R Programming

jwutil (version 1.2.3)

random_test_dates: generate random Dates or POSIXlt test datetimes

Description

generate random Dates and POSIXlt test datetimes

Usage

random_test_dates(n = n_rnd, origin = as.Date("2000-01-01"),
  dayspread = 365 * 150)

random_test_posixlt_datetimes(n = n_rnd, origin = as.Date("2000-01-01"), dayspread = 365 * 150)

Arguments

n

integer number to generate

origin

Date defaults to Jan 1, 2000.

dayspread

integer number of days either side of origin to pick random dates from, defaults to 150 years.

Value

vector of POSIXlt datetimes or Dates