Learn R Programming

datetoiso (version 1.2.1)

check_if_year_month_day_entered: Check if a vector contains a complete date

Description

Check if a vector contains a complete date

Usage

check_if_year_month_day_entered(
  data_frame,
  column_name,
  separator = "-",
  date_format = "ymd",
  year = "UNKN",
  month = "UNK",
  day = "UN"
)

Value

A logical vector

Arguments

data_frame

data frame

column_name

name of column that keeps dates to be imputed

separator

by default "-" it is a day-month-year separator, for example "2024-10-21" has "-" separator

date_format

by default "ymd". choose between ymd (if first year, then month then day) and dmy (if first day, then month then year)

year

by default "UNKN" - the format of unknown year

month

by default "UNK" - the format of unknown month

day

by default "UN" - the format of unknown day

Author

Lukasz Andrzejewski