Re: [R] use list elements to subtract values from the dataframe

2008-05-07 Thread Julian Burgos
Try get(paste("wf$",fl[[1]],sep="")) See ?get Julian Dirkheld wrote: Hi, I have a dataframe wf existing of a header with different labels and beneath the values of those labels : wf: label1 label2 ... 0,450,21 0,100,45 I have a list fl <- c("label2","label3",..)

Re: [R] use list elements to subtract values from the dataframe

2008-05-07 Thread jim holtman
What you want is: wf[[fl[1]]] 'fl' is a vector, so you should only be using a single '[' for indexing. On Wed, May 7, 2008 at 3:20 AM, Dirkheld <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a dataframe wf existing of a header with different labels and beneath > the values of those labels : > wf:

Re: [R] use list elements to subtract values from the dataframe

2008-05-07 Thread Ashish Ranpura
Dirkheld soc.kuleuven.be> writes: > I have a dataframe wf existing of a header with different labels and beneath > the values of those labels : > wf: > label1 label2 ... > 0,450,21 > 0,100,45 > > > I have a list > fl <- c("label2","label3",..) > > Isn't possible to use