Edit: This problem doesn\'t seem to be reproducible at this point, but I\'ve updated this question to a more concise example that illustrates what the behavior was, in case
There are as many summary functions as there are regression procedures and many of them use cat
with would not get into a value returned. My suggestion is to use cat and capture.output both of which have a file
destination parameter and an append
option:
cat("Here are my results:\n", file="~/R/res4.txt")
capture.output( summary(res4), file"~/R/res4.txt", append=TRUE)