[R] Working with lists with numerical names

2006-02-23 Thread Christopher Swingley
Greetings! I'm have a hard time working with some data I imported from a baseball database. Several of the database columns have numbers in them (2B, 3B), and when I try to use these vectors from the data frame, I get syntax errors, probably because it's interpreting the name as a number:

Re: [R] Working with lists with numerical names

2006-02-23 Thread Sundar Dorai-Raj
Christopher Swingley wrote: Greetings! I'm have a hard time working with some data I imported from a baseball database. Several of the database columns have numbers in them (2B, 3B), and when I try to use these vectors from the data frame, I get syntax errors, probably because it's

Re: [R] Working with lists with numerical names

2006-02-23 Thread jim holtman
x playerID yearID stint teamID lgID G AB R H 2B 3B HR RBI SB CS BB 1 robleos01 2005 1LAN NL 110 364 44 99 18 1 5 34 0 8 31 2 iguchta01 2005 1CHA AL 135 511 74 142 25 6 15 71 15 5 47 3 molinya01 2005 1SLN NL 114 385 36 97 15 1 8 49 2 3 23

Re: [R] Working with lists with numerical names

2006-02-23 Thread Christopher Swingley
Sundar, * Sundar Dorai-Raj [EMAIL PROTECTED] [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