Skip to content

Use of abbreviations

2 messages · Robert Cunningham, Brian Ripley

#
Hi there,

Here is my situation:
NEWBIE!!!!!
_              
platform i386-pc-mingw32
arch     x86            
os       Win32          
system   x86, Win32     
status                  
major    1              
minor    2.2            
year     2001           
month    02             
day      26             
language R             

I wonder why.

Given this data set
[1] "id"   "run"  "trap" "spp"  "no"  

I can use 'n' as an abbreviation for 'no'
[1] 18087

but below I cannot
Error in sum(n) : Object "n" not found
Error: syntax error


Am I missing something from the manual?

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Thu, 22 Mar 2001, Robert Cunningham wrote:

            
[I suggest that you resist this...see below.]
Names of components are partially matched when accessed by $, or [[ ]].
After attaching a list, the general search mechanism is used, and symbols
are not partially matched.

Beware that using partial matching is regrarded as bad practice, as
changing the list (e.g. adding to it) can break code which relies on this.