Re: [R] cumsum function with data frame

2010-06-03 Thread Jorge Ivan Velez
;> > >> > >> - Original Message > >> > From: Felipe Carrillo > >> > To: Joris Meys ; "n.via...@libero.it" > >> > > >> > Cc: r-help@r-project.org > >> > Sent: Thu, June 3, 2010 11:28:58 AM > >> > Sub

Re: [R] cumsum function with data frame

2010-06-03 Thread Joris Meys
nia, USA >> >> >> >> - Original >> > Message >> > From: Joris Meys <> ymailto="mailto:jorism...@gmail.com"; >> > href="mailto:jorism...@gmail.com";>jorism...@gmail.com> >> > To: "> ymailto=&q

Re: [R] cumsum function with data frame

2010-06-03 Thread Jorge Ivan Velez
--- > > From: Felipe Carrillo > > To: Joris Meys ; "n.via...@libero.it" < > n.via...@libero.it> > > Cc: r-help@r-project.org > > Sent: Thu, June 3, 2010 11:28:58 AM > > Subject: Re: [R] cumsum function with data frame > > > > You can also use

Re: [R] cumsum function with data frame

2010-06-03 Thread Felipe Carrillo
le),transform,CUMSUM=cumsum(value))   - Original Message > From: Felipe Carrillo > To: Joris Meys ; "n.via...@libero.it" > > Cc: r-help@r-project.org > Sent: Thu, June 3, 2010 11:28:58 AM > Subject: Re: [R] cumsum function with data frame > > You can

Re: [R] cumsum function with data frame

2010-06-03 Thread Felipe Carrillo
roject.org > Sent: Thu, June 3, 2010 9:26:17 AM > Subject: Re: [R] cumsum function with data frame > > See ?split and ?unsplit. Data <- > read.table(textConnection("variable        Year    >   value EC01            2005    >     5 EC01            2006  >       10

Re: [R] cumsum function with data frame

2010-06-03 Thread Joris Meys
See ?split and ?unsplit. Data <- read.table(textConnection("variableYear value EC01 2005 5 EC01 2006 10 AAO12005 2 AAO1 2006 4"),header=T) Datalist <-split(Data,Data$variable) resultlist <- lapply(Datali

[R] cumsum function with data frame

2010-06-03 Thread n.via...@libero.it
Dear list, I have a problem with the cumsum function. I have a data frame like the following one variableYear value EC01 2005 5 EC01 2006 10 AAO12005 2 AAO1 2006 4 what I would like to obtain is varia