Counts the Time differences (epochs) per group (in a grouped dataset)
count_difftime(dataset, Datetime.colname = Datetime)
a tibble
with the number of occurences of each time difference per
group
A light logger dataset. Expects a dataframe
. If not imported
by LightLogR, take care to choose a sensible variable for the
Datetime.colname
.
column name that contains the datetime. Defaults to
"Datetime"
which is automatically correct for data imported with
LightLogR. Expects a symbol
. Needs to be part of the dataset
. Must
be of type POSIXct
.
#get a dataset with irregular intervals
filepath <- system.file("extdata/sample_data_LYS.csv", package = "LightLogR")
dataset <- import$LYS(filepath)
#count_difftime returns the number of occurences of each time difference
#and is more comprehensive in terms of a summary than `gap_finder` or
#`dominant_epoch`
count_difftime(dataset)
dominant_epoch(dataset)
gap_finder(dataset)
#irregular data can be regularized with `aggregate_Datetime`
dataset %>% aggregate_Datetime(unit = "15 secs") %>% count_difftime()
Run the code above in your browser using DataLab