Skip to content

An small suggestion for the R team

8 messages · Gabor Grothendieck, Thomas Lumley, Duncan Murdoch +1 more

#
Hi all,

I would like to suggest that all R functions/etc like:
   codes-deprecated
   grid-internal
   ns-alt
   ns-dblcolon
   ns-hooks
   ns-internals
   ns-lowlev
   ns-reflect.Rd
   tools-internal
   ts-defunct
   utils-deprecated
   utils-internal
   ... and another

i.e, function/word separate for '-'

were all substituted by
   codes_deprecated
   grid_internal
   ns_alt
   ns_dblcolon
   ns_hooks
   ns_internals
   ns_lowlev
   ns_reflect.Rd
   tools_internal
   ts_defunct
   utils_deprecated
   utils_internal
   ... and another

i.e, by '_'

Because it is impossible to make a good highlighter with the first one.

How to differentiating myValue:

varOne = 100
varTwo = 50
myValue = varOne-varTwo

from codes-deprecated, or ns-alt, for example.

TIA,
#
On 8/4/05, Jose Claudio Faria <joseclaudio.faria at terra.com.br> wrote:
One can create a variable with a minus in it by using
backquotes:
[1] 9  # 3 + 10 - 4
#
On 8/4/05, Gabor Grothendieck <ggrothendieck at gmail.com> wrote:
One other point.  The help system, i.e. ?, accommodates minus
signs like this where the last two statements below give
the same result:

library(survival)
?"survival-internal"
internal?survival

Another example is,

library(dyn)
package?dyn
#
Gabor Grothendieck wrote:
Indeed, the above are very good examples of how to contour the original problem Gabor!
But the central problem is to make Good R highlighter, as I'm trying to do
for the programs Tinn-R and jEdit with this functions.

Is not possible differentiate the signal minus as a simple character (word-word) from
the mathematical operator minus (object-object).

I think that is more easy to remove all this functions/reserved words.

TIA,
#
On Thu, 4 Aug 2005, Jose Claudio Faria wrote:
These are not R functions or reserved works. They are just the names of 
help pages.  They should not occur in code (except in double-quoted 
strings).

 	-thomas
#
Jose Claudio Faria wrote:
Your suggested names are all valid identifiers.  The "-" gives strings 
that are not.  That's intentional; the help system relies on it.  You 
find "utils-deprecated" using deprecated?utils.

If your highlighter has problems with the "-", then don't bother 
highlighting.  Those names aren't very common.  Or...
...you could do it by context.  codes-deprecated will only show up in 
*.Rd files as a possible search term:  an alias, or a name.

Duncan Murdoch
#
Hi THomas,

This is very a good information: thanks very much!
So, I will just now to remove all from the highlighters.
BTW, do you know if the signal minus is used in some function or reserved word?

TIA,

Jose Claudio Faria
Thomas Lumley wrote:
#
Ok Duncan,

Thank you very much for the tip!
I will to remove all these identifiers.

Regards,
--
Jose Claudio Faria
Duncan Murdoch wrote: