R/check.remove.params.R

check.remove.params <-
function (remove.absolute, remove.ratio) 
{
    if (!is.na(remove.absolute) && !is.na(remove.ratio)) {
        stop("At least one of remove.absolute and remove.ratio should be NA.")
    }
    if (!is.na(remove.ratio) && (remove.ratio < 0 || remove.ratio >= 
        0.5)) {
        stop("The remove.ratio should take value in range [0, 0.5).")
    }
    if (!is.na(remove.absolute) && (remove.absolute <= 0)) {
        stop("The remove.absolute should take value greater than 0.0.")
    }
}

Try the vudc package in your browser

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

vudc documentation built on May 2, 2019, 9:19 a.m.