R/CorrectType.R

CorrectType <- function (type, data_) 
{
    if ((min(data_) >= 0) && length(data_) == 2 && type == 3) 
        return(TRUE)
    if (length(data_) == 2 && type == 2) 
        return(TRUE)
    if (length(data_) == 4 && type == 1) 
        return(TRUE)
    return(FALSE)
}

Try the VecStatGraphs2D package in your browser

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

VecStatGraphs2D documentation built on May 2, 2019, 12:36 p.m.