Re: [R] Adding elements in data.frame subsets and also subtracting an element from the rest elements in data.frame

2013-04-29 Thread arun
essage - From: Katherine Gobin To: r-help@r-project.org Cc: Sent: Monday, April 29, 2013 8:24 AM Subject: [R] Adding elements in data.frame subsets and also subtracting an     element from the rest elements in data.frame Dear R forum I have a data.frame as cashflow_df = data.frame(instru

Re: [R] Adding elements in data.frame subsets and also subtracting an element from the rest elements in data.frame

2013-04-29 Thread arun
April 29, 2013 8:24 AM Subject: [R] Adding elements in data.frame subsets and also subtracting an element from the rest elements in data.frame Dear R forum I have a data.frame as cashflow_df = data.frame(instrument = c("ABC","ABC","ABC","ABC",&quo

Re: [R] Adding elements in data.frame subsets and also subtracting an element from the rest elements in data.frame

2013-04-29 Thread Bert Gunter
If this is a homework problem, there is a no homework policy on this list. -- Bert On Mon, Apr 29, 2013 at 5:24 AM, Katherine Gobin wrote: > Dear R forum > > I have a data.frame as > > cashflow_df = data.frame(instrument = > c("ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC",

[R] Adding elements in data.frame subsets and also subtracting an element from the rest elements in data.frame

2013-04-29 Thread Katherine Gobin
Dear R forum I have a data.frame as cashflow_df = data.frame(instrument = c("ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC","ABC", "ABC", "PQR", "PQR", "PQR","PQR","PQR","PQR","PQR","PQR","PQR","PQR", "PQR", "PQR", "PQR","PQR", "PQR","PQR","PQR","PQR", "PQR","PQR"