[R] controlling number of decimals printed in anova tables?
Gabor Grothendieck
ggrothendieck at gmail.com
Mon Feb 16 17:17:46 CET 2009
On Mon, Feb 16, 2009 at 11:08 AM, Dieter Menne
<dieter.menne at menne-biomed.de> wrote:
> Gabor Grothendieck <ggrothendieck <at> gmail.com> writes:
>
>>
>> Or safer:
>>
>> df <- as.integer(round(...))
>>
>
> Did you try? I believe it is a problem of printCoefmat that has quite
> a few options for special column, but none for df. Ask Martin Mächler.
Yes, with as.integer(round(...)) It looks like this:
> modelFit.glm(berk.mod2)
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> modelFit.glm(berk.mod2)
Analysis of Deviance Table
Formula: Freq ~ Dept * (Gender + Admit)
Deviance df Pr(>Chi^2)
Null model 2650 23
Model 22 6 0.0014 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Also note:
> as.integer(1-.00001)
[1] 0
> as.integer(round(1-.00001))
[1] 1
More information about the R-help
mailing list