R/calculate-utilities.R

Defines functions dateVariableInWindow singleSeries andSubsetIfItExists

andSubsetIfItExists <- function(x, subset)
{
    if (is.null(subset))
        return(x)
    x & subset
}


singleSeries <- function(data)
{
    attr(data, "cohort.type") %in% c("None", "New")
}


dateVariableInWindow <- function(from, period.start, next.period.start)
{
    from >= period.start & from < next.period.start
}
Displayr/flipRevenueMetrics documentation built on June 14, 2025, 6:54 p.m.