Learn R Programming

swfscMisc (version 1.6.5)

autoUnits: Auto Time Interval Units

Description

Convert time interval units to natural values based on magnitude of difference.

Usage

autoUnits(x)

Arguments

x

an object inheriting from class difftime

Author

Eric Archer eric.archer@noaa.gov

Examples

Run this code
autoUnits(as.difftime("0:3:35"))
autoUnits(as.difftime("15:3:35"))
autoUnits(ISOdate(2000, 5, 1) - ISOdate(2000, 4, 20))

Run the code above in your browser using DataLab