View source: R/is_difftime_less.R
is_difftime_less | R Documentation |
This is just a wrapper to difftime
.
is_difftime_less(
time1,
time2,
less_than = 1,
units = "days",
verbose = FALSE,
visible = !verbose,
stop_on_error = FALSE
)
time1 |
See |
time2 |
See |
less_than |
The number of units that would be too much of a difference. |
units |
See |
verbose |
Be verbose? |
visible |
Set to |
stop_on_error |
Throw an error if the time lag is not less than less_than. |
TRUE
if the times do not differ 'that much', but see
stop_on_error.
Other bits and pieces:
golden_ratio()
,
is_valid_primary_key()
,
r_cmd_install()
,
str2num()
,
strip_off_attributes()
,
tapply()
,
throw()
a <- as.POSIXct(0, origin = "1970-01-01", tz = "GMT")
b <- as.POSIXct(60*60*24, origin = "1970-01-01", tz = "GMT")
c <- as.POSIXct(60*60*24 - 1, origin = "1970-01-01", tz = "GMT")
is_difftime_less(a, b)
is_difftime_less(a, c)
print(is_difftime_less(a, b, verbose = TRUE))
print(is_difftime_less(a, c, verbose = TRUE))
try(is_difftime_less(a, b, stop_on_error = TRUE))
is_difftime_less(a, c, verbose = TRUE, stop_on_error = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.