[R] reserved words documentation

Liaw, Andy andy_liaw at merck.com
Wed Mar 5 20:18:39 CET 2003


Section 10.3.3 in the R Language Manual, as distributed with R.

Andy

> -----Original Message-----
> From: white.denis at epamail.epa.gov [mailto:white.denis at epamail.epa.gov]
> Sent: Wednesday, March 05, 2003 1:52 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] reserved words documentation
> 
> 
> I wanted a data frame component to be named "next", for example:
> 
> > m <- data.frame (matrix (0, nrow=2, ncol=2))
> > names (m) <- c("prev", "next")
> > m
>   prev next
> 1    0    0
> 2    0    0
> 
> But "next" being reserved prevents $ indexing without quotes:
> 
> > m$next
> Error: syntax error
> > m$"next"
> [1] 0 0
> 
> Although they are mostly obvious, I can't find in the documentation
> (using Jon Baron's searcher, at least) a list of these words.  Am I
> missing the documentation, or could such a list be added to a future
> release?
> 
> thanks,
> Denis
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 

------------------------------------------------------------------------------



More information about the R-help mailing list