15 Oct 2017
Similar to sink():
s <- summary(iris) capture.output(s, file = "myfile.txt") mod1 <- lm(size ~ day, data=myData) capture.output(mod1, file = "myfile.txt")
R
function