R/pretty.check.R

pretty.check <-
function (x, transformation.in,...)
{
    if (!interactive() || (exists(".Batch") && .Batch))
        return(x)
    is.missing <- function(vector) {
        vector <- (vector < -10^30) | (vector > 10^30) | (is.na(vector))
        return(vector)
    }
    repeat {
        pretty.tran <- f.relationship(x, transformation.in)
        if (any(is.missing(pretty.tran))) {
            cat("Bad pretty values; need to replace:\n")
            print(x)
            print(pretty.tran)
            cat("Enter; hit return twice when done:\n")
            x <- scan()
      } else {
            return(x)
        }
    }
    return(x)
}
Auburngrads/SMRD documentation built on Sept. 14, 2020, 2:21 a.m.