Skip to content
Prev 277380 / 398506 Next

Remove names and more from list with capture.output()

Hi R users,

I end up with a list object after running an anova:
[1] TRUE
Df      F    Pr(>F)
2 -1 18.512 8.481e-05 ***
---
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1

I would like to use capture.output() when writing this information to
a text file, but I would like to only print the row, not the names (Df
     F    Pr(>F)), and not the significance codes. That is, I want the
text printed to my text file to be:

2 -1 18.512 8.481e-05 ***

Is there a way to do this?

Thanks
Sverre