On Thu, Sep 13, 2018 at 3:33 PM Rich Shepard <rshep...@appl-ecosys.com> wrote: > > Neither ?sink nor ?capture.output indicates how the output file can be > specified to be in a directory other than the cwd. > > When the cwd is ../analyses/ and I want the output to be in > ../analyses/stat-summaries/ how do I write this? > > sink('example-output.txt') > print(summary(df)) > sink() > > writes output to the current directory. My attempts to prefix the file name > with ./ or just / don't sit well with R.
Hi welcome to R-help. Please help the helper(s) to help you by being as explicit as possible what you've tried (i.e. cut'n'paste your code), provide error messages (cut'n'paste) you get, if any, and/or what you mean by "don't sit well with R" (that can mean many different things). /Henrik > What is the proper syntax? > > TIA, > > Rich > > ______________________________________________ > 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. ______________________________________________ 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.