Re: [R] cumulative sum by group and under some criteria

2013-03-12 Thread arun
0.1403911 0.4437053 0.3958713 0.2262191 A.K. From: Joanna Zhang zjoanna2...@gmail.com To: arun smartpink...@yahoo.com Sent: Monday, March 11, 2013 10:54 PM Subject: Re: [R] cumulative sum by group and under some criteria Thanks! it works well if I open up R

Re: [R] cumulative sum by group and under some criteria

2013-03-11 Thread arun
0.10585941 #2 0.10972831 #3 0.14262500 #4 0.05037883 #5 0.04808759 #6 0.05944387 A.K. From: Joanna Zhang zjoanna2...@gmail.com To: arun smartpink...@yahoo.com Sent: Monday, March 11, 2013 3:55 PM Subject: Re: [R] cumulative sum by group and under some criteria

Re: [R] cumulative sum by group and under some criteria

2013-03-01 Thread arun
. From: Joanna Zhang zjoanna2...@gmail.com To: arun smartpink...@yahoo.com Sent: Friday, March 1, 2013 11:40 AM Subject: Re: [R] cumulative sum by group and under some criteria Hi, why there is an error when I run the cumulative sum code below? Error in `[-.data.frame`(`*tmp

Re: [R] cumulative sum by group and under some criteria

2013-02-27 Thread arun
0.3 0.4 A.K. From: Joanna Zhang zjoanna2...@gmail.com To: arun smartpink...@yahoo.com Sent: Wednesday, February 27, 2013 1:25 AM Subject: Re: [R] cumulative sum by group and under some criteria Thanks very much! it works! suppose that I have a data: m1 n1 m

Re: [R] cumulative sum by group and under some criteria

2013-02-27 Thread Zjoanna
: Joanna Zhang [hidden email]http://user/SendEmail.jtp?type=nodenode=4659801i=0 To: arun [hidden email]http://user/SendEmail.jtp?type=nodenode=4659801i=1 Sent: Wednesday, February 27, 2013 1:25 AM Subject: Re: [R] cumulative sum by group and under some criteria Thanks very much! it works

Re: [R] cumulative sum by group and under some criteria

2013-02-27 Thread Jeff Newmiller
, 2013 1:25 AM Subject: Re: [R] cumulative sum by group and under some criteria Thanks very much! it works! suppose that I have a data: m1 n1 m nA BC D 224 5 0.10.2 0.2 0.3 2 2 4 4 0.2 0.1 0.3 0.4 I want to identify the max value of D and extract

Re: [R] cumulative sum by group and under some criteria

2013-02-26 Thread Zjoanna
=4659514i=4 Sent: Tuesday, February 19, 2013 11:43 AM Subject: Re: [R] cumulative sum by group and under some criteria Thanks. I can get the data I expected (get rid of the m1=3, n1=3) using the join and 'inner' code, but just curious about the way to expand the data. There should

Re: [R] cumulative sum by group and under some criteria

2013-02-26 Thread arun
$x, 0.8+res2$m-res2$x)  length(Pm2) #[1] 1000 A.K. - Original Message - From: Zjoanna zjoanna2...@gmail.com To: r-help@r-project.org Cc: Sent: Tuesday, February 26, 2013 3:13 PM Subject: Re: [R] cumulative sum by group and under some criteria Hi Arun I noticed that the values of Fmm

Re: [R] cumulative sum by group and under some criteria

2013-02-26 Thread Zjoanna
/SendEmail.jtp?type=nodenode=4659769i=0 To: [hidden email] http://user/SendEmail.jtp?type=nodenode=4659769i=1 Cc: Sent: Tuesday, February 26, 2013 3:13 PM Subject: Re: [R] cumulative sum by group and under some criteria Hi Arun I noticed that the values of Fmm, Fnn, and other corresponding variables

Re: [R] cumulative sum by group and under some criteria

2013-02-26 Thread arun
(strsplit(i,,function(x) rbeta(1000,0.2+x[1],0.8+x[2]-x[1])) A.K. From: Joanna Zhang zjoanna2...@gmail.com To: arun smartpink...@yahoo.com Sent: Tuesday, February 26, 2013 10:37 PM Subject: Re: [R] cumulative sum by group and under some criteria I don't get

Re: [R] cumulative sum by group and under some criteria

2013-02-26 Thread arun
...@gmail.com To: arun smartpink...@yahoo.com Sent: Tuesday, February 26, 2013 11:32 PM Subject: Re: [R] cumulative sum by group and under some criteria ok. 1) for each row in the data, I want to simulate a sample of 1000  observations(Pm2) for the combination of x, m and another sample of 1000

Re: [R] cumulative sum by group and under some criteria

2013-02-24 Thread Zjoanna
From: Joanna Zhang [hidden email]http://user/SendEmail.jtp?type=nodenode=4659515i=0 To: arun [hidden email]http://user/SendEmail.jtp?type=nodenode=4659515i=1 Sent: Saturday, February 23, 2013 5:35 PM Subject: Re: [R] cumulative sum by group and under some criteria

Re: [R] cumulative sum by group and under some criteria

2013-02-24 Thread arun
$Qm = c11, ) :   object 'c11' not found A.K. - Original Message - From: Zjoanna zjoanna2...@gmail.com To: r-help@R-project.org Cc: Sent: Sunday, February 24, 2013 4:48 PM Subject: Re: [R] cumulative sum by group and under some criteria Thanks! Solved. I have another question

Re: [R] cumulative sum by group and under some criteria

2013-02-23 Thread arun
Subject: Re: [R] cumulative sum by group and under some criteria Thanks!  Then I need to create new variables based on the res2.  I can't find Fmm_f1, Fnn_f2, R2, Qm2, Qn2 until  running the code several times and the values of Fnn_f2, Fmm_f2 are correct. attach(res2) res2$p1-x/m res2$p2-y/n res2

Re: [R] cumulative sum by group and under some criteria

2013-02-23 Thread arun
0.302 0.6  0.698    0.4 0.5490 0.698  0.4 From: Joanna Zhang zjoanna2...@gmail.com To: arun smartpink...@yahoo.com Sent: Saturday, February 23, 2013 5:35 PM Subject: Re: [R] cumulative sum by group and under some criteria the row wise min or max of R2, Rmm2

Re: [R] cumulative sum by group and under some criteria

2013-02-19 Thread arun
Zhang zjoanna2...@gmail.com To: arun smartpink...@yahoo.com Sent: Saturday, February 16, 2013 8:46 PM Subject: Re: [R] cumulative sum by group and under some criteria Hi, What I need is to expand each row by adding several columns and . Let me restate the question. I have a dataset d, I want

Re: [R] cumulative sum by group and under some criteria

2013-02-19 Thread arun
  0.512 0.9025   0.64 A.K. - Original Message - From: Zjoanna zjoanna2...@gmail.com To: r-help@r-project.org Cc: Sent: Monday, February 18, 2013 10:36 PM Subject: Re: [R] cumulative sum by group and under some criteria Thanks. I tried this code below, why does expanded dataset 'res1

Re: [R] cumulative sum by group and under some criteria

2013-02-19 Thread arun
: Tuesday, February 19, 2013 10:42 AM Subject: Re: [R] cumulative sum by group and under some criteria Thanks. But I thougth the expanded dataset 'res1' should not have combination of m1=3 and n1=3 because it is based on dataset 'd3' which doesn't have m1=3 and n1=3, right? In the example that you

Re: [R] cumulative sum by group and under some criteria

2013-02-19 Thread arun
in the expansion.  So, I am not sure about how it will look like. A.K. From: Joanna Zhang zjoanna2...@gmail.com To: arun smartpink...@yahoo.com Sent: Tuesday, February 19, 2013 11:43 AM Subject: Re: [R] cumulative sum by group and under some criteria Thanks. I can get

Re: [R] cumulative sum by group and under some criteria

2013-02-19 Thread arun
...@gmail.com To: arun smartpink...@yahoo.com Sent: Tuesday, February 19, 2013 11:43 AM Subject: Re: [R] cumulative sum by group and under some criteria Thanks. I can get the data I expected (get rid of the m1=3, n1=3) using the join and 'inner' code, but just curious about the way to expand

Re: [R] cumulative sum by group and under some criteria

2013-02-19 Thread Zjoanna
, February 19, 2013 11:43 AM Subject: Re: [R] cumulative sum by group and under some criteria Thanks. I can get the data I expected (get rid of the m1=3, n1=3) using the join and 'inner' code, but just curious about the way to expand the data. There should be a way to expand the data based on each

Re: [R] cumulative sum by group and under some criteria

2013-02-19 Thread arun
...@gmail.com To: arun smartpink...@yahoo.com Sent: Tuesday, February 19, 2013 11:43 AM Subject: Re: [R] cumulative sum by group and under some criteria Thanks. I can get the data I expected (get rid of the m1=3, n1=3) using the join and 'inner' code, but just curious about the way to expand the data

Re: [R] cumulative sum by group and under some criteria

2013-02-18 Thread Zjoanna
://user/SendEmail.jtp?type=nodenode=4658895i=1 Cc: R help [hidden email]http://user/SendEmail.jtp?type=nodenode=4658895i=2 Sent: Saturday, February 16, 2013 11:49 PM Subject: Re: [R] cumulative sum by group and under some criteria d2- data.frame() for (m1 in 2:3) { for (n1 in 2:2

Re: [R] cumulative sum by group and under some criteria

2013-02-17 Thread arun
16, 2013 11:49 PM Subject: Re: [R] cumulative sum by group and under some criteria d2- data.frame() for (m1 in 2:3) {     for (n1 in 2:2) {     for (x1 in 0:(m1-1)) {     for (y1 in 0:(n1-1)) {         for (m in (m1+2): (7-n1)){           for (n in (n1+2):(9-m

Re: [R] cumulative sum by group and under some criteria

2013-02-16 Thread arun
  3  2  2  1 5 4 2 #57  3  2  2  1 5 4 3 #58  3  2  2  1 5 4 4 A.K. From: Joanna Zhang zjoanna2...@gmail.com To: arun smartpink...@yahoo.com Sent: Saturday, February 16, 2013 8:46 PM Subject: Re: [R] cumulative sum by group and under some criteria Hi, What I

Re: [R] cumulative sum by group and under some criteria

2013-02-16 Thread arun
, February 16, 2013 8:46 PM Subject: Re: [R] cumulative sum by group and under some criteria Hi, What I need is to expand each row by adding several columns and . Let me restate the question. I have a dataset d, I want to expand it to d2 showed below. d-data.frame() for (m1 in 2:3) {     for (n1

Re: [R] cumulative sum by group and under some criteria

2013-02-10 Thread Zjoanna
email]http://user/SendEmail.jtp?type=nodenode=4657773i=15 To: [hidden email]http://user/SendEmail.jtp?type=nodenode=4657773i=16 Cc: Sent: Friday, February 1, 2013 12:19 PM Subject: Re: [R] cumulative sum by group and under some criteria Thank you very much for your reply. Your code work well

Re: [R] cumulative sum by group and under some criteria

2013-02-06 Thread arun
- From: Zjoanna zjoanna2...@gmail.com To: r-help@r-project.org Cc: Sent: Friday, February 1, 2013 12:19 PM Subject: Re: [R] cumulative sum by group and under some criteria Thank you very much for your reply. Your code work well with this example. I modified a little to fit my real data, I got

Re: [R] cumulative sum by group and under some criteria

2013-02-06 Thread arun
0.0004812500    0.02720 #Sorry, some values in my previous solution didn't look right. I didn't  A.K. - Original Message - From: Zjoanna zjoanna2...@gmail.com To: r-help@r-project.org Cc: Sent: Friday, February 1, 2013 12:19 PM Subject: Re: [R] cumulative sum by group and under some

Re: [R] cumulative sum by group and under some criteria

2013-02-05 Thread arun
. - Original Message - From: Zjoanna zjoanna2...@gmail.com To: r-help@r-project.org Cc: Sent: Friday, February 1, 2013 12:19 PM Subject: Re: [R] cumulative sum by group and under some criteria Thank you very much for your reply. Your code work well with this example. I modified a little to fit my

Re: [R] cumulative sum by group and under some criteria

2013-02-05 Thread arun
in my previous solution didn't look right. I didn't  A.K. - Original Message - From: Zjoanna zjoanna2...@gmail.com To: r-help@r-project.org Cc: Sent: Friday, February 1, 2013 12:19 PM Subject: Re: [R] cumulative sum by group and under some criteria Thank you very much for your reply

Re: [R] cumulative sum by group and under some criteria

2013-02-05 Thread Zjoanna
]http://user/SendEmail.jtp?type=nodenode=4657614i=10 To: [hidden email]http://user/SendEmail.jtp?type=nodenode=4657614i=11 Cc: Sent: Friday, February 1, 2013 12:19 PM Subject: Re: [R] cumulative sum by group and under some criteria Thank you very much for your reply. Your code work well

Re: [R] cumulative sum by group and under some criteria

2013-02-05 Thread arun
12:19 PM Subject: Re: [R] cumulative sum by group and under some criteria Thank you very much for your reply. Your code work well with this example. I modified a little to fit my real data, I got an error massage. Error in split.default(x = seq_len(nrow(x)), f = f, drop = drop, ...) :   Group

Re: [R] cumulative sum by group and under some criteria

2013-02-03 Thread arun
solution didn't look right. I didn't  A.K. - Original Message - From: Zjoanna zjoanna2...@gmail.com To: r-help@r-project.org Cc: Sent: Friday, February 1, 2013 12:19 PM Subject: Re: [R] cumulative sum by group and under some criteria Thank you very much for your reply. Your code work well

Re: [R] cumulative sum by group and under some criteria

2013-02-01 Thread Zjoanna
I am new to this mailing list. Is everything I posted seen for everyone in the mailing list? or just you can see the post? On Fri, Feb 1, 2013 at 11:33 AM, arun kirshna [via R] ml-node+s789695n465731...@n4.nabble.com wrote: HI, Could you show the modified code and also str(dataset)? A.K.

Re: [R] cumulative sum by group and under some criteria

2013-02-01 Thread arun
Message - From: Zjoanna zjoanna2...@gmail.com To: r-help@r-project.org Cc: Sent: Friday, February 1, 2013 12:19 PM Subject: Re: [R] cumulative sum by group and under some criteria Thank you very much for your reply. Your code work well with this example. I modified a little to fit my real data

Re: [R] cumulative sum by group and under some criteria

2013-02-01 Thread arun
in my previous solution didn't look right. I didn't  A.K. - Original Message - From: Zjoanna zjoanna2...@gmail.com To: r-help@r-project.org Cc: Sent: Friday, February 1, 2013 12:19 PM Subject: Re: [R] cumulative sum by group and under some criteria Thank you very much for your reply. Your