Re: [R] Accessing a field in a data fram

2008-07-02 Thread jim holtman
?"[[" decision <- "one" raw[[decision]] On Wed, Jul 2, 2008 at 3:10 PM, R_Learner <[EMAIL PROTECTED]> wrote: > > raw <- read.csv(file=filename, head=TRUE,sep=",") > > I've read in a csv file, and I'm looking to access a column whose name is > held in a string. > > For example, I want to access ra

Re: [R] Accessing a field in a data fram

2008-07-02 Thread Marc Schwartz
on 07/02/2008 02:10 PM R_Learner wrote: raw <- read.csv(file=filename, head=TRUE,sep=",") I've read in a csv file, and I'm looking to access a column whose name is held in a string. For example, I want to access raw$one or raw$two, but this will depending on the string. Let's say that the stri

[R] Accessing a field in a data fram

2008-07-02 Thread R_Learner
raw <- read.csv(file=filename, head=TRUE,sep=",") I've read in a csv file, and I'm looking to access a column whose name is held in a string. For example, I want to access raw$one or raw$two, but this will depending on the string. Let's say that the string is decision<-"one". How would I access