R/checkSTARdf.R

Defines functions checkSTARdf

checkSTARdf <- function(d, version) {
    switch(as.character(version), async = {
        if (!("decision.times" %in% colnames(d))) {
            stop("d does not contain the column 'decision.times'.")
        }
        if (c("lags") %in% colnames(d)) {
            warning("d should not contain the columns 'lags'.")
        }
    }, dep = {
        if (!("lags" %in% colnames(d))) {
            stop("d does not contain the column 'lags'.")
        }
        if (c("decision.times") %in% colnames(d)) {
            warning("d should not contain the columns 'decision.times'.")
        }
    })
}

TRUE
TRUE

Try the onlineFDR package in your browser

Any scripts or data that you put into this service are public.

onlineFDR documentation built on Nov. 8, 2020, 6:35 p.m.