timeSingle | R Documentation |
Convenience function that takes in a time object and calculates a difference with a user specified prompt
timeSingle(string = "Time difference", startTime, endTime = Sys.time(),
sep = ":")
string |
string of what was timed |
startTime |
"POSIXct" "POSIXt" object, usually from |
endTime |
"POSIXct" "POSIXt" object, usually from |
sep |
string, usually character that is used as the separator between user prompt and time difference |
prompt_string string user prompt with time difference
Daniel Y. Chen
x <- 3.14
strt <- Sys.time()
sq <- x ** 2
timeSingle('Squaring value', strt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.