R/midpoints.r

Defines functions midpoints

Documented in midpoints

midpoints <-
function (x, dp = 2) 
{
    lower <- as.numeric(gsub(",.*", "", gsub("\\(|\\[|\\)|\\]", 
        "", x)))
    upper <- as.numeric(gsub(".*,", "", gsub("\\(|\\[|\\)|\\]", 
        "", x)))
    return(round(lower + (upper - lower)/2, dp))
}

Try the FREddyPro package in your browser

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

FREddyPro documentation built on May 29, 2017, 7:22 p.m.