View source: R/dateToDatetime.R
dateToDatetime | R Documentation |
The aggDataframe
function produces non-standard data frames, which have dates
rather than datetimes as their first column. This function will convert a data frame with dates
in the first column to have datetimes with the time being set to a constant value.
dateToDatetime(dataframe, hour = 0, timezone = "", logfile = "")
dataframe |
Required. A data frame. The first name of the column must be date, and it must be standard R date. |
hour |
Optional. The hour to be used for the datetime values. Default is |
timezone |
Required. The name of the timezone of the data as a character string. This should be the timezone of your data, but omitting daylight savings time. Note that the timezone code is specific to your OS. To avoid problems, you should use a timezone without daylight savings time. Under Linux, you can use CST and MST for Central Standard or Mountain Standard time, respectively. Under Windows or OSX, you can use etc/GMT+6 or etc/GMT+7 for Central Standard and Mountain Standard time. DO NOT use America/Regina as the time zone, as it includes historical changes between standard and daylight savings time. |
logfile |
Optional. Name of the file to be used for logging the action. Normally not used. |
If successful, returns a data frame where the first column is a standard CRHMr datetime. If unsuccessful, returns an error.
Kevin Shook
aggDataframe
datetimeToDate
Badlake.radiation.daily <- aggDataframe(BadLake7376, period='daily',
columns=c(6,7,8), funs=c('mean'))
BadLake.datetime <- dateToDatetime(Badlake.radiation.daily, timezone='CST')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.