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]]

