as.seconds: returns the amount of seconds in the object

Description Usage Arguments Examples

View source: R/utils.R

Description

the as.seconds functions take an object and depending on its type they convert it to the amount of seconds it contains. Date and POSIXct objects are considered as difftime object from the unix epoch.

Usage

1
as.seconds(value)

Arguments

value

the object that is to be converted into seconds.

Examples

1
2
EPOCH <- structure(0, class = c("POSIXct", "POSIXt"), tzone = "UTC")
as.seconds(EPOCH)  # gives 0

delftfews documentation built on May 2, 2019, 4:48 p.m.