s2dhms: Transforms seconds to an array of days, hours, minutes and...

View source: R/s2dhms.R

s2dhmsR Documentation

Transforms seconds to an array of days, hours, minutes and seconds.

Description

Transforms seconds to an array of days, hours, minutes and seconds.

Usage

s2dhms(
  sec,
  digits = 3,
  clock.out = FALSE,
  names = c("d", "h", "m", "s"),
  strip = FALSE,
  drop = FALSE
)

m2dhm(
  m,
  digits = 3,
  clock.out = FALSE,
  names = c("d", "h", "m"),
  strip = FALSE,
  drop = FALSE
)

Arguments

sec

The input seconds.

digits

The number of digits of the "seconds" part of the output.

clock.out

Logical: If TRUE the time excluding the days are to be returned as a string vector of elements HH:MM:SS.FFF (two digits).

names

Names of the output columns.

strip, drop

Logical: If TRUE strip off e.g. hours when 0, and in that case drop the output if drop=TRUE.

m

The input minutes.


arnejohannesholmin/TSD documentation built on April 14, 2024, 5:29 a.m.