Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://svn.r-project.org/R/trunk@2309 00db46b3-68df-0310-9c12-caf00c1e9a41
- Loading branch information
maechler
committed
Sep 25, 1998
1 parent
dcdbee7
commit f071ddb
Showing
7 changed files
with
95 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,24 @@ | ||
print.anova <- function(x, digits = max(.Options$digits - 2, 3), | ||
signif.stars= .Options$show.signif.stars, ...) | ||
{ | ||
heading <- attr(x, "heading") | ||
if (!is.null(heading)) cat(heading, sep = "\n") | ||
attr(x, "heading") <- NULL | ||
nn <- names(x) | ||
## *ANY* print method should return its argument invisibly! | ||
|
||
###-- we should be able to do withOUT for() | ||
###-- and use new print.coefmat(.), instead ! -- MM. | ||
|
||
for (i in 1:NCOL(x)) { | ||
xr <- x[[i]] | ||
if (substr(nn[i],1,2) == "Pr") { | ||
x[[i]] <- format.pval(xr, digits = max(1, min(5, digits - 1)), na="") | ||
if(signif.stars) | ||
x$Signif <- c(symnum(xr[!is.na(xr)], corr = FALSE, | ||
cutpoints = c(0, 0.001, 0.01, 0.05, 0.1, 1), | ||
symbols = c("***", "**", "*", ".", " ")), | ||
"") ## 'nterms' ~= 'Residuals' have no P-value | ||
##- nn <- names(x) | ||
##- | ||
##- for (i in 1:NCOL(x)) { | ||
##- xr <- x[[i]] | ||
##- if (substr(nn[i],1,2) == "Pr") { | ||
##- x[[i]] <- format.pval(xr, digits = max(1, min(5, digits - 1)), na="") | ||
##- if(signif.stars) | ||
##- x$Signif <- c(symnum(xr[!is.na(xr)], corr = FALSE, | ||
##- cutpoints = c(0, 0.001, 0.01, 0.05, 0.1, 1), | ||
##- symbols = c("***", "**", "*", ".", " ")), | ||
##- "") ## 'nterms' ~= 'Residuals' have no P-value | ||
##- | ||
##- } else if (!is.factor(xr) && is.numeric(xr)) { | ||
##- cxr <- format(zapsmall(xr, digits=digits), digits=digits) | ||
##- cxr[is.na(xr)] <- "" | ||
##- x[[i]] <- cxr | ||
##- } | ||
##- } | ||
##- print.data.frame(x) | ||
|
||
|
||
} else if (!is.factor(xr) && is.numeric(xr)) { | ||
cxr <- format(zapsmall(xr, digits=digits), digits=digits) | ||
cxr[is.na(xr)] <- "" | ||
x[[i]] <- cxr | ||
} | ||
} | ||
print.data.frame(x) | ||
} | ||
## which (invisibly) returns the newly changed, instead of the original x ! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters