units(x) ## S3 method for class 'difftime': units(x)units(x) <- value ## S3 method for class 'difftime': units(x) <- value
x | a difftime object. |
value | a character string specifying the time unit, such as "secs", "mins", "hours", "days", and "weeks". |
units, units.difftime | returns the units attribute of x. |
units<-, units<-.difftime | returns a difftime object converted from x with value used as the time unit. |
(dt <- as.difftime("01:00:00")) units(dt)units(dt) <- "secs"; dt units(dt)