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 anyone encounters a similar issue.
sink("res4.txt")
cat("Here are my results:\n")
summary(mtcars)
sink()
The sink("~/R/res4.txt")
function in the last line will store the "Here are my results"
line, but not the summary(res4)
line in the .txt
file.
Typing summary(mtcars)
produces the correct data set, and I don't understand why the output of summary(mtcars)
isn't included.