1 | formatCoefmat(x, digits = 6, pdigits = digits - 1)
|
x |
|
digits |
|
pdigits |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (x, digits = 6, pdigits = digits - 1)
{
pformat <- function(x, digits) {
x <- format(xx <- round(x, digits))
x[as.double(xx) == 0] <- paste(c("<.", rep("0", digits -
1), "1"), collapse = "")
x
}
xx <- array("", dim = dim(x), dimnames = dimnames(x))
for (i in 1:ncol(xx)) {
xx[, i] <- format(round(x[, i], digits), digits = digits)
}
if (length(isp <- grep("^Pr\(", colnames(x))) > 0) {
xx[, isp[1]] <- pformat(x[, isp[1]], digits = pdigits)
}
xx
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.