R/qft.cens.r

# This function censors QFT result values greater than 10 IU/mL to 10 IU/mL,
# per Cellestis' instructions

qft.cens <- function(x){
    # If any values are greater than 10, censor those values to 10
    if(any(x > 10, na.rm = TRUE)){

        x.cens <- x
        x.cens[x.cens > 10] <- 10

        warning("One or more values were greater than 10 IU/mL and have been censored to 10 IU/mL.")

        return(x.cens)

    } else return(x)
}

Try the tbdiag package in your browser

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

tbdiag documentation built on May 2, 2019, 7:59 a.m.