convert_to_datetime: Get datetime from date and time columns

View source: R/get_crash_times.R

convert_to_datetimeR Documentation

Get datetime from date and time columns

Description

Adds a column of datetime using date and crsh time (formatted via convert_time_to_hms())

Usage

convert_to_datetime(
  dataframe,
  colname = "crsh_datetime",
  date_col = "CRSHDATE",
  time_hour_col = "crsh_time",
  include_min = TRUE
)

Arguments

dataframe

a dataframe

colname

new column name

date_col

date column in ymd

time_hour_col

time column in hm or hms. May have to use format_time() function.

include_min

if time_hour_col has minutes

Value

A new column called crsh_datetime with POSIXt class

Examples

## Not run: convert_to_datetime(crash, colname = "crsh_datetime")

jacciz/wisdotcrashdatabase documentation built on June 3, 2023, 2:26 a.m.