R/utils.R

Defines functions seconds2datetime has_name datetime2seconds

datetime2seconds <- function(x) {
  as.numeric(x)
}

has_name <- function(x, colname) colname %in% colnames(x)

seconds2datetime <- function(x) {
  as.POSIXct(x, origin = ISOdate(1970, 1, 1, 0), tz = "UTC")
}

Try the rtide package in your browser

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

rtide documentation built on Sept. 11, 2024, 8:06 p.m.