add_date: Add date/time column to data.frame

View source: R/add_date.R

add_dateR Documentation

Add date/time column to data.frame

Description

Takes the ‘Year', 'Month', 'Day' and, if available, 'Hour', 'Minute' and 'Second' columns of a data.frame and uses them to produce a 'Date' column that uses R’s standard data/time format.

Usage

add_date(df)

Arguments

df

Data frame containing columns 'Year', 'Month', 'Day' and - optionally - 'Hour', 'Minute' and/or 'Second'

Details

Converts YEARMODA to R date

Value

data.frame consisting of the df input and a new column 'Date'

Author(s)

Eike Luedeling

Examples



add_date(KA_weather)
add_date(Winters_hours_gaps)

 

chillR documentation built on Nov. 28, 2023, 1:09 a.m.