R/validate_timeDF.R

Defines functions .is.timeDF validate_timeDF

Documented in validate_timeDF

validate_timeDF = function(timeDF, noerror = FALSE){
    if(! .is.timeDF(timeDF)){
        if(noerror){
            return(FALSE)
        }else{
            stop("not a valid timeDF object")
        }
    }
    return(TRUE)
}

## Internal
.is.timeDF = function(timeDF){
    if(! is(timeDF, "timeDF")){
        return(FALSE)
    }
    if( is.null(time_var(timeDF))){
        return(FALSE)
    }
    return(TRUE)
}

Try the timeDF package in your browser

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

timeDF documentation built on May 29, 2024, 5:12 a.m.