R/ts.format.R

Defines functions ts.format

Documented in ts.format

ts.format <- function(x, format = "%d/%m/%Y", cols = c(1, 2)) {
    names(x)[cols] <- c("Date", "Q")
    x[["Date"]] <- strptime(x[["Date"]], format = format)
    x[["Date"]] <- as.POSIXct(x[["Date"]])
    return(x)
} 

Try the hydrostats package in your browser

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

hydrostats documentation built on June 1, 2022, 9:06 a.m.