How to tweak Tinn-R to show all program code on the R-console

58 views
Skip to first unread message

h.po...@gmail.com

unread,
Nov 23, 2016, 10:36:02 AM11/23/16
to Tinn-R Editor
Dear Jose and colleagues,

Having a new computer I uploaded the newest version of Tinn-R (v. 5.01). It does many amazing things, far more than I will probably ever use, but there is one thing I cannot get it to do:

When I send a selection of code to the console (or the whole program code), in the console I will only see the R output, but not the input. The only message I get colour-coded in red is:
> source(.trPaths[4], echo=TRUE, max.deparse.length=150)
and subsequently the output of the program in blue.
However, I would like the console to show both the lines of source code AND the output. This is especially useful when tracing for errors. Showing both input and output lines cannot be very complicated, when I send one line of code with Tinn-R, it does exactly that.

So my questions are:
1. Have I overlooked this possibility among the very rich choice of options of Tinn-R. If so, where can I find it?
2. If not, would it not be a good option to add?

I see on the web that many people have wrestled with .trPaths before, and I also have read elsewhere that Jose Fario does not consider this feature to be useful. But I know that various people including myself would be very happy with it!
(So far the "solution" for me is to use a pretty old version of Tinn-R (v. 1.19) which does not show this behaviour.)

Thanks for your help,

Hendrick

Jose Claudio Faria

unread,
Nov 23, 2016, 3:45:29 PM11/23/16
to h.po...@gmail.com, Tinn-R Editor
Dear Hendrick,

Tinn-R has an option: Options/R echo (on/off), the shortcut is ALT + E.
Set it to on.

If you have a selection like the below:

x <- rnorm(10)
x

y <- rnorm(10)
y

and you send this selection to R, the R output will be the below:

> source(.trPaths[5], echo=TRUE, max.deparse.length=100)
> set.seed(17)

> x <- rnorm(10)

> x
[1] -1.01500872 -0.07963674 -0.23298702 -0.81726793 0.77209084 -0.16561194
[7] 0.97287443 1.71653398 0.25523700 0.36658112

> y <- rnorm(10)

> y
[1] 1.18078924 0.64319207 1.29532187 0.18791807 1.59120510 -0.05517906
[7] 0.83847112 0.15937013 0.62595440 0.63358473

>

You can see the input and the output joined.

max.deparse is an argument that the user can change in
Options/Application/R/Basic (R) see
Option(max.deparse.length(echo=TRUE)).

Often you want to submit an entire file or a selection to be
interpreted by R but are not interested in output, in which case you
should change the option to echo = off (ALT + E).

We consider the .trPaths object (generated when the TinnRcom package
is loaded) very useful, modern and we see no reason to replace with
long addresses and excessive output.

You may be surprised that you have not been following the evolution of
the project in recent years, but I believe that as you use more you
will realize the benefits and agree to your adoption.

All the best,
///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\
Jose Claudio Faria
Estatistica
UESC/DCET/Brasil
joseclaudio.faria at gmail.com
Telefones:
55(73)3680.5545 - UESC
55(73)99966.9100 - VIVO
55(73)99100.7351 - TIM
55(73)98817.6159 - OI
55(73)98129.9942 - CLARO
///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\

"The science exists because there are patterns.
The statistic exists to research the patterns."
> --
> You received this message because you are subscribed to the Google Groups
> "Tinn-R Editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tinn-r+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

h.po...@gmail.com

unread,
Nov 24, 2016, 5:32:28 AM11/24/16
to Tinn-R Editor
Dear Jose,

Thanks for your explanation! I look forward to be catapulted in the modern age of Tinn-R! ;-)

Both the input and output is listed in the R console when echo is on. However, I still do not get
1. The separation in color between R input (red) and output (blue), which is very useful to keep the overview.
2. The possibility to get back a specific line of submitted code by pressing the up (or down) arrow.

Both of these features are standard in version 1.19. Can you explain which boxes I have to tweak for that in version 5.01?

Best wishes,
Hendrick

Jose Claudio Faria

unread,
Nov 24, 2016, 4:42:51 PM11/24/16
to h.po...@gmail.com, Tinn-R Editor
On Thu, Nov 24, 2016 at 7:32 AM, <h.po...@gmail.com> wrote:
> Dear Jose,
>
> Thanks for your explanation! I look forward to be catapulted in the modern
> age of Tinn-R! ;-)

We are always open to suggestions.

> Both the input and output is listed in the R console when echo is on.
> However, I still do not get
> 1. The separation in color between R input (red) and output (blue), which is
> very useful to keep the overview.

Sorry, if you really want to work only with Rgui this request should
be made to the R Core Team responsible for Rgui.

Do you have any objections to the Rterm interface? It very cool to
small and medium tasks.

> 2. The possibility to get back a specific line of submitted code by pressing
> the up (or down) arrow.

For whole file, selections, etc, this feature is only available for
the Rterm interface.

> Both of these features are standard in version 1.19. Can you explain which
> boxes I have to tweak for that in version 5.01?

The version (1.9) of the project used the windows clipboard as IPC
(Inter process comunication). Due to conflicts with other applications
(and to be a rudimentary IPC) it has been replaced.

Try the Rterm interface, it is much more interactive and flexible than Rgui.
I think you will like it.

Best,
Reply all
Reply to author
Forward
0 new messages