as.time | R Documentation |
Converts an elapsed time (in seconds) into a human readable string. String is output in units decreasing from the largest integer unit of day/hour/min/sec. If the time is greater than 1 day, seconds are not printed.
as.time(sec,digits)
sec |
Elapsed time in seconds |
digits |
Number of decimal places to use when reporting smalled time unit |
string: time elapsed in Day, Hr, Min, Sec.
Angus H Wright AIfA awright@astro.uni-bonn.de
elapsed.time <- Sys.time()
for (i in 1:6) {
print(as.time(10^i,digits=3))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.