Hi,

I need to capture the output in a physical file when I run an R script. I would like to capture the output as a TXT file. I am thinking something along the line of the tee command is what I am after, but I am not certain what I am after here.

https://en.wikipedia.org/wiki/Tee_(command)

https://www.gnu.org/software/coreutils/manual/html_node/tee-invocation.html


Here is a syntax example of how I use the tee command on other efforts of life:
/bin/bash ./BackUp_script-v3.sh | tee -a ~/Desktop/script-run-Sunday-1.txt


Here is a syntax example of how I am running my R scripts now:
#R Studio Console
#source("./process/script-name.r")

#Bash Terminal
#Rscript ./process/script-name.r


QUESTIONS
What command or function am I after to capture console and terminal output?

It would be best to also define the character encoding and line ending parameters of the TXT file. How do I amend my existing script run syntax to capture the said outputs?


Thanks,
--
*Stephen Dawson, DSL*
/Executive Strategy Consultant/
Business & Technology
+1 (865) 804-3454
http://www.shdawson.com <http://www.shdawson.com>

______________________________________________
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.

Reply via email to