On Tue, 2 Nov 2021 10:18:07 -0700 (PDT) Rich Shepard <rshep...@appl-ecosys.com> wrote:
> 'corvalis discharge summary\n' > summary(cor_disc) > sd(cor_disc$cfs) > '-----------------\n' In the interactive mode, on the top level of execution, these commands behave as if you had written print(sink('data-summaries.txt')) print('corvalis discharge summary\n') print(summary(cor_disc)) print(sd(cor_disc$cfs)) instead. When you source() a script, auto-printing is not performed. This is explained in the first paragraph of ?source, but not ?sink. If you want to source() scripts and rely on their output (including sink()), you'll need to print() results explicitly. -- Best regards, Ivan ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.