Re: [R] condition in triple summation

2015-10-19 Thread Sherouk Moawad via R-help
If I'm summing over (i,j,k) each from 1 to 3 And I have �condition that (i>j>k) But I want to restrict this condition to only cases where i,j,k>1 Sent from Yahoo Mail on Android From:"Jeff Newmiller" <jdnew...@dcn.davis.ca.us> Date:Mon, Oct 19, 2015 at 1:24 AM

Re: [R] condition in triple summation

2015-10-19 Thread jim holtman
have condition that (i>j>k) > > But I want to restrict this condition to only cases where i,j,k>1 > > Sent from Yahoo Mail on Android > > From:"Jeff Newmiller" <jdnew...@dcn.davis.ca.us> > Date:Mon, Oct 19, 2015 at 1:24 AM > Subject:Re: [R] c

Re: [R] condition in triple summation

2015-10-19 Thread Sherouk Moawad via R-help
il on Android From:"Jeff Newmiller" <jdnew...@dcn.davis.ca.us> Date:Mon, Oct 19, 2015 at 1:24 AM Subject:Re: [R] condition in triple summation Learn to post using plain text format. We are seeing garbage on the screen. ---

Re: [R] condition in triple summation

2015-10-18 Thread Jeff Newmiller
Learn to post using plain text format. We are seeing garbage on the screen. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live

[R] condition in triple summation

2015-10-18 Thread Sherouk Moawad via R-help
Dear R-Expertsx=c(0,0.3, 0.5,0.6)sum(sapply(1:4, function(i) {sum(sapply(1:3, function(j){sum(sapply(1:2, function(k) {(i>j)*(j>k)*exp(x[i]+x[j]+x[k])}))}))})) I want to restrict the condition (i>j>k) to only those cases where i>1>1>1In other words'if i=1 then i>=jif j=1 then j>=kother wise