dt2str {cwhstring}R Documentation

Convert time difference to string.

Description

Convert time difference to string depending on switch.

Usage

  dt2str(dt,verbose=FALSE)

Arguments

dt Time difference in seconds
verbose If TRUE, then "hours minutes seconds", else "::"

Value

String representing the time difference.

Author(s)

Christian W. Hoffmann, christian.hoffmann@wsl.ch, http://www.wsl.ch/staff/christian.hoffmann

Examples

  time1 <- Sys.time()
  x <- 0
  for (i in 1:100000) x <- x+1
  time2 <- Sys.time()
  dt2str(unclass(time2)-unclass(time1))
  dt2str(unclass(time2)-unclass(time1),TRUE)

[Package cwhstring version 2.0 Index]