Why isn't the R function sink() writing a summary output to my results file?

前端 未结 1 1451
时光说笑
时光说笑 2020-12-11 12:17

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

相关标签:
1条回答
  • 2020-12-11 12:25

    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)
    
    0 讨论(0)
提交回复
热议问题