datetimeToDate: Converts an R datetime to a date

View source: R/datetimeToDate.R

datetimeToDateR Documentation

Converts an R datetime to a date

Description

This is used when a CRHMr date is stored as a datetime (POSIXct) variable.

Usage

datetimeToDate(dataframe, logfile = "")

Arguments

dataframe

Required. A data frame. The first name of the column must be a POSIXct variable, which can be converted to a standard R date.

logfile

Optional. Name of the file to be used for logging the action. Normally not used.

Value

If successful, returns a data frame where the first column is a standard CRHMr date. If unsuccessful, returns an error.

Author(s)

Kevin Shook

See Also

dateToDatetime

Examples

Badlake.radiation.daily <- aggDataframe(BadLake7376, period='daily',
columns=c(6,7,8), funs=c('mean'))
BadLake.datetime <- dateToDatetime(Badlake.radiation.daily, timezone='CST')
BadLake.date <- datetimeToDate(BadLake.datetime)


CentreForHydrology/CRHMr documentation built on April 6, 2024, 5:27 p.m.