[R] Working with lists with numerical names
Christopher Swingley
cswingle at iarc.uaf.edu
Fri Feb 24 00:24:42 CET 2006
Sundar,
* Sundar Dorai-Raj <sundar.dorai-raj at pdf.com> [2006-Feb-23 14:23 AKST]:
> Hi, Chris,
>
> > x <- data.frame(1:5, 6:10)
> > names(x) <- c("R", "2B")
> > x
> R 2B
> 1 1 6
> 2 2 7
> 3 3 8
> 4 4 9
> 5 5 10
> > x$"2B"
Thanks. I swear I tried just about every other combination of possible
escape character. But I didn't try:
frame$"vector"
or
`vector`
My bad.
I *knew* it was something simple!
Cheers,
Chris
--
Christopher S. Swingley email: cswingle at iarc.uaf.edu
Intl. Arctic Research Center
University of Alaska Fairbanks www.frontier.iarc.uaf.edu/~cswingle/
More information about the R-help
mailing list