R/assemble.date.R

`assemble.date` <-
function (table) 
{
    t.midnight <- table$Hour==24
    table$Hour[t.midnight] <- 23 
    dates <- strptime(paste(sep = "", table$Year, "-", table$Month,
        "-", table$Day, " ", table$Hour%%24), "%Y-%m-%d %H") 
    dates[t.midnight] <- dates[t.midnight]+3600
    return(as.POSIXct(dates,tz="GMT"))
}

Try the wasim package in your browser

Any scripts or data that you put into this service are public.

wasim documentation built on May 1, 2019, 6:50 p.m.