[R] How to show both the commands and the output on the screen?
1
0
Entering edit mode
Peng Yu ▴ 940
@peng-yu-3586
Last seen 10.3 years ago
Thank you for your comments. I forward this information to the mailing list. So others could see it. Regards, Peng On Sun, Aug 9, 2009 at 12:10 AM, <markleeds at="" verizon.net=""> wrote: > hi: the only way I know of is to install ess+emacs and use that. that will > give you? two windows. in one window > you can have the R code and in the other window there's an R prompt and the > top windoiw commands ( the top > window is essentuially an editor )? can get sent to the R prompt. So both > the output and the commands > but they will be in different windows but they will be there.? essentially > ess lets you use type R commands from the command line or send commands in > from the editor ( in the top window ) and see the output on the screen > or capture it or whatever. > > It takes some getting used to and I only know the basics of it but the time > investment of installing and learning is well > worth it in the long run. there may be other suggestions so I would wait to > see what other people say before you do this. > > > > > On Aug 9, 2009, Peng Yu <pengyu.ut at="" gmail.com=""> wrote: > > Hi, > > Rscript does not print the commands in the script. I am wondering what > command can print both the commands as well as the output on the > screen. > > Regards, > Peng > > ______________________________________________ > R-help at r-project.org mailing list > 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. >
• 3.7k views
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 4 months ago
United States
On Sun, Aug 9, 2009 at 12:10 AM, <markleeds@verizon.net> wrote: > > hi: the only way I know of is to install ess+emacs and use that. that > will > > give you two windows. in one window > > you can have the R code and in the other window there's an R prompt and > the > > top windoiw commands ( the top > > window is essentuially an editor ) can get sent to the R prompt. So both > > the output and the commands > > but they will be in different windows but they will be there. > essentially > > ess lets you use type R commands from the command line or send commands > in > > from the editor ( in the top window ) and see the output on the screen > > or capture it or whatever. > > > > It takes some getting used to and I only know the basics of it but the > time > > investment of installing and learning is well > > worth it in the long run. there may be other suggestions so I would wait > to > > see what other people say before you do this. > > > > > > > > > > On Aug 9, 2009, Peng Yu <pengyu.ut@gmail.com> wrote: > > > > Hi, > > > > Rscript does not print the commands in the script. I am wondering what > > command can print both the commands as well as the output on the > > screen. > The standard way to control R options is via options(). See the help for options() and look at "echo". In short, add: options(echo=TRUE) to the top of your R script and you will get the commands and the output. Sean [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

Traffic: 857 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6