Learn R Programming

oce (version 0.1-82)

ctime.to.seconds: Interpret a character string as a time interval

Description

Interpret a character string as a time interval

Usage

ctime.to.seconds(ctime)

Arguments

ctime
a character string (see Details.

Value

  • A numeric value, the number of seconds represented by the string.

Details

Strings are of the form MM:SS or HH:MM:SS.

See Also

See seconds.to.ctime, the inverse of this.

Examples

Run this code
library(oce)
cat("10      = ", ctime.to.seconds("10"), "s
", sep="")
cat("01:04   = ", ctime.to.seconds("01:04"), "s
", sep="")
cat("1:00:00 = ", ctime.to.seconds("1:00:00"), "s
", sep="")

Run the code above in your browser using DataLab