Skip to contents

Constructor for creating a subclass of `<data.frame>` called `<birthdays>`

Usage

birthdays(x)

Arguments

x

A `data.frame`

Value

An `birthdays` object

Examples

df = data.frame(
  name = c("kevin", "stacey"),
  birthday = c(as.Date("2001-01-01"), as.Date("2002-01-02"))
)
birthdays(df)
#> A `birthdays` object with 2 rows and 2 cols


# generate large randomised `<birthdays>` objects

df <- data.frame(
  name = randomNames::randomNames(10),
  birthday = sample(
    x = seq.Date(
      from = as.Date("2020-01-01"),
      to = as.Date("2022-01-01"),
      by = 1),
    size = 10
  )
)
birthdays <- birthdays(df)