shift_values_range | R Documentation |
shift values for specific regions
shift_values_range(dat, shift)
dat |
data.table to filter (name, datetime) |
shift |
data.table of filter start and end times (name, start, end) |
#=============================================================================== #' @title filter_dates #' #' @description remove values from a data.table (non-equi join filter) #' #' @author Jonathan Kennel jkennel@uoguelph.ca #' #' @param dat data.table to filter (name, datetime) #' @param filt data.table of filter start and end times (start, end) #' #' @return filtered data.table #' #' @export #=============================================================================== filter_dates <- function(dat, filt)
dat[!J(filt), on = .(name, datetime >= start, datetime <= end)]
data.table with shifted values
Jonathan Kennel jkennel@uoguelph.ca
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.