Shortcuts View and summary

87 views
Skip to first unread message

Berry Boessenkool

unread,
Feb 11, 2014, 10:59:00 AM2/11/14
to tin...@googlegroups.com

Hi,

I really love Tinn-R for having the shortcut "F2" sending str(selected) to R. I sorely miss it in Rstudio...
Is there a way to get shortcuts for View and summary?
I couldn't find it in the manual (I still have version 3.0.2.7 at my work computer), did I just miss it there?

In the options - shortcuts "group: R control", I couldn't find it either. There are still some function buttons not in usage (F4, F5), so I see potential here...

Maybe it's an idea to enable customized functions there as well?

regards,
Berry

Berry Boessenkool

unread,
Feb 11, 2014, 11:03:47 AM2/11/14
to Tinn R

On a related question:

there are many functions with a dot, like data.frame for example.
Getting help for such functions requires me to first select the whole function before pressing F1.
in Rstudio, this is not necessary.

Would there be a way to implement that in Tinn R while keeping it the way that double-clicking on a word selects the word only?
I guess lots of users are used to the period being a word separator just as a space is...

Berry



From: berryboe...@hotmail.com
To: tin...@googlegroups.com
Subject: Shortcuts View and summary
Date: Tue, 11 Feb 2014 16:59:00 +0100

Jose Claudio Faria

unread,
Feb 11, 2014, 2:46:38 PM2/11/14
to Berry Boessenkool, tin...@googlegroups.com
> I really love Tinn-R for having the shortcut "F2" sending str(selected) to
> R. I sorely miss it in Rstudio...
> Is there a way to get shortcuts for View and summary?

Yes, there is!
Main menu/R/Hotkeys/Custom.
(See Barry_01.png).

Give a looked in the User guide.
The window Tinn-R hotkeys (related to the operational system) of the
latest version has a Help button.

> I couldn't find it in the manual (I still have version 3.0.2.7 at my work
> computer), did I just miss it there?

Upgrade to the latest stable version: 3.0.3.5:
- http://nbcgib.uesc.br/lec/software/editores/tinn-r/en
- https://sourceforge.net/projects/tinn-r/

> In the options - shortcuts "group: R control", I couldn't find it either.
> There are still some function buttons not in usage (F4, F5), so I see
> potential here...
>
> Maybe it's an idea to enable customized functions there as well?

The only way to customize functions in Tinn-R is using Hotkeys.

HTH,
--
///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\
Jose Claudio Faria
Estatistica
UESC/DCET/Brasil
joseclaudio.faria at gmail.com
Telefones:
55(73)3680.5545 - UESC
55(73)9100.7351 - TIM
55(73)8817.6159 - OI
///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\
Barry_01.png

Jose Claudio Faria

unread,
Feb 11, 2014, 2:56:09 PM2/11/14
to Berry Boessenkool, Tinn R
> there are many functions with a dot, like data.frame for example.
> Getting help for such functions requires me to first select the whole
> function before pressing F1.
> in Rstudio, this is not necessary.
>
> Would there be a way to implement that in Tinn R while keeping it the way
> that double-clicking on a word selects the word only?
> I guess lots of users are used to the period being a word separator just as
> a space is...

Sorry, but if the object (function, data.frame, etc) has a dot inside
of the name

for example:
data.frame
is.function
all.equal and a lot of then

It is really necessary to select the entire name of the object for all
actions (Help, example, etc).

Berry Boessenkool

unread,
Feb 12, 2014, 9:53:34 AM2/12/14
to Jose Claudio Faria, Tinn R

That's exactly what I was looking for!
Thank you so much!

I can have something like

info <- function(obj)
        {cat("class:", class(obj), "\nmode:", mode(obj),
         "\nis.vector:", is.vector(obj), "\nstr:\n"); str(obj);
         cat("\nhead:\n"); head(obj)
        }

in my Rprofile.site (or private function collection package) and also assign a shortcut to it.

Beats Rstudio in comfortability by a decade, at least ;-)

Thanks,
Berry




> Date: Tue, 11 Feb 2014 17:46:38 -0200
> Subject: Re: Shortcuts View and summary
> From: joseclau...@gmail.com
> To: berryboe...@hotmail.com
> CC: tin...@googlegroups.com
> --
> 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/groups/opt_out.

Jose Claudio Faria

unread,
Feb 12, 2014, 4:07:02 PM2/12/14
to Berry Boessenkool, Tinn R
> Beats Rstudio in comfortability by a decade, at least ;-)

Software is like fruit, it takes time to acquire aroma, flavor and sweetness...

marQIsoft

unread,
Sep 7, 2016, 3:41:39 PM9/7/16
to Tinn-R Editor, berryboe...@hotmail.com, Jose Claudio Faria, Tinn-R Editor
Hi Jose,

Considering the recent enhancements of completion/tip features regarding pattern matching using powerful and more robust regular expressions, could you apply the same "power" to the List Structure (F2) and similar tools? I refer, in particular, to the recognition of object names even when they have punctuation within, or hierarchy. Here are some examples which currently require a manual selection of the full name of the object prior to pressing F2:

r.object1 <- 1.234 #!Either 'r' or 'object1', but full name is not read, except if manu. selected
r_object2
<- 2.345 #Oh, this one already works; cool.
rlist3
<- list(a=1, b=2, c=3, d=4, e=list(aa=1, bb=2)) #(here, only creating the list object)
rlist3$a
#!When the cursor is placed after the '$', F2 searches an object named 'a'. Instead, it should search for the list element 'rlist3$a'...
rlist3$e
#!same problem, but should show the structure of element 'e' which is also a list
rlist3$e$bb
#!same problem but one level deeper in the hierarchy.



My suggestion:

1. Use your updated regular expressions to treat punctuation characters correctly when reading object names such as 'r_object', 'r.object' or other special names with non-alphanumeric chars. This will do, for reading treating object names in absence of hierarchy...

2. To deal with hierarchical objects (in particular: lists!), use a regular expression which also take into account the position within a hierarchical list object, when '$' symbols are detected LEFT of the text-typing cursor. The idea is to read the R code starting with the "symbol" name right at the cursor, but continue reading leftwards until a real separator is found. Here are some examples:

rlist3$e$b[Cursor]b should show:
 num 2

rlist3$e[Cursor]$bb should show:
List of 2
 $ aa: num 1
 $ bb: num 2

rlis[Cursor]t3$e$bb shows what we expect, because it's the level one (no hierarchy yet):
List of 5
 $ a: num 1
 $ b: num 2
 $ c: num 3
 $ d: num 4
 $ e:List of 2
  ..$ aa: num 1
  ..$ bb: num 2

If you want to generalize the fixing of this ~issue, you may be interested in working on improving the recognition of "hierarchy" related to slots as well... Although used less frequently, some users may thank you if you also improve this. And I think it might be very easy to do: you probably just have to duplicate your regular expression so that it deals with '@' the same way as they would do with '$'. If I remember well, regular expressions allow 'A or B' criteria, which may be appropriate here?­...

Moreover, I would add that although the ~issues I've described here are related to the F2 tool, some other tools from Tinn-R may share the same limitations, e.g. the example tool (CTRL+F1). Therefore, I invite you to generalize the improvements to these other tools, when it's relevant.

Lastly, as a complement to what I described above, I'd like to suggest a minor but cool improvement you could add to the Help tools (help F1, example CTRL+F1, open example CTRL+F2). Currently, when the object name under the cursor (or manually selected text) is a reserved word or a special symbol such as an operator, the help tools don't work correctly. The solution is very simple. You would just have to add quotes around the name to avoid misinterpretation by R. Here are some problematic symbols: for, while, +, %/%, [, ..., and many others. I'm not 100% sure, but I think the solution I propose (...to add quotes around the selected or at-cursor text...) can solve this minor issue completely. 

I hope these suggestions will interest you.
And I wish you a good week.


Marc (alias marQIsoft)

Jose Claudio Faria

unread,
Sep 18, 2016, 8:06:55 PM9/18/16
to marQIsoft, Tinn-R Editor, Berry Boessenkool
Hello Marc,

We appreciate the suggestions.
We will be studying the feasibility to improve the program behavior.

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
///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\


Reply all
Reply to author
Forward
0 new messages