Description Usage Arguments Value Author(s) See Also Examples
View source: R/printDuration.R
Evaluate and print difference between moment of time at which time
interval began (usually captured by function Sys.time
some time ago) and
the present (i.e., moment when function printDuration
is called).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Start, start |
Moment of time which is treated as the beggining (object of class
|
Message |
Message before time stamp that describes it. Default is
|
returnString |
If |
End, end |
Moment of time which is treated as the end (object of class
|
print |
(logical) should the result be printed using package pander? |
Text indicating how much time has passed (either printed in console or as a string).
Vilmantas Gegzna
Other spMisc utilities:
bru()
,
clc()
,
clear()
,
fCap()
,
isFALSE()
,
list_AddRm()
,
make.filenames()
,
open_wd()
,
regexp2df()
,
st01()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | Start <- Sys.time()
Start
## [1] "2016-02-12 16:15:09 UTC"
class(Start)
## [1] "POSIXct" "POSIXt"
printDuration(Start)
## Duration of analysis: 23.3 secs
printDuration(Start,"From start till now")
## From start till now 39.2 secs
my_duration <- printDuration(Start)
my_duration
## NULL
my_duration <- printDuration(Start, returnString = TRUE)
my_duration
## [1] "Analysis completed in 2.4 mins"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.