R/print_digits.R

Defines functions print_digits

Documented in print_digits

## File Name: print_digits.R
## File Version: 0.03

print_digits <- function(x, digits=NULL)
{
    NC <- ncol(x)
    if (length(digits)==1){
        digits <- rep(digits, NC)
    }
    for (cc in 1:NC){
        y <- x[,cc]
        if (is.numeric(y)){
            x[,cc] <- round(y, digits=digits[cc])
        }
    }
    print(x)
    invisible(x)
}
alexanderrobitzsch/sirt documentation built on Sept. 8, 2024, 2:45 a.m.