Description Usage Arguments Details Value Examples
Acceptable inputs:
numeric: time in seconds to nap
POSIXct: time at which the nap should stop (timezone is respected)
character: yyyy-mm-dd hh:mm:ss at which nap should stop, time zone is assumed to be Sys.timezone() and hh:mm:ss is optional as three formats may be missing, cf. lubridate::ymd_hms().
Period: time from now at which the nap should stop
difftime: difference in time to nap
logical: If TRUE, nap for default duration, otherwise don't nap.
NULL: don't nap
generic: error or nap for default duration depending on the option naptime.permissive
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | naptime(time, permissive = getOption("naptime.permissive",
permissive_default))
## S4 method for signature 'numeric'
naptime(time, permissive = getOption("naptime.permissive",
permissive_default))
## S4 method for signature 'Period'
naptime(time, permissive = getOption("naptime.permissive",
permissive_default))
## S4 method for signature 'POSIXct'
naptime(time, permissive = getOption("naptime.permissive",
permissive_default))
## S4 method for signature 'difftime'
naptime(time,
permissive = getOption("naptime.permissive", permissive_default))
## S4 method for signature 'logical'
naptime(time, permissive = getOption("naptime.permissive",
permissive_default))
## S4 method for signature ''NULL''
naptime(time, permissive = getOption("naptime.permissive",
permissive_default))
## S4 method for signature 'character'
naptime(time,
permissive = getOption("naptime.permissive", permissive_default))
|
time |
Time to sleep, polymorphic type inputs, leaning towards units as 'seconds' |
permissive |
An optional argument to override the |
The default duration is set with a numeric for the option naptime.default_delay
in seconds (default: 0.1)
Whether a generic input is accepted is determined by the option naptime.permissive
(default: FALSE)
NULL; A side effect of a pause in program execution
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.