[R] Use of abbreviations

Robert Cunningham robut at forest.go.th
Thu Mar 22 06:19:06 CET 2001


Hi there,

Here is my situation:
> User
NEWBIE!!!!!

> version
         _              
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
> names(ants)
[1] "id"   "run"  "trap" "spp"  "no"  

I can use 'n' as an abbreviation for 'no'

> sum(ants$n)
[1] 18087

but below I cannot

> attach(ants)
> sum(n)
Error in sum(n) : Object "n" not found
> sum($n)
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list