Re: [R] Appending elements according to criteria to an empty array

2009-08-20 Thread Marc Schwartz
On Aug 20, 2009, at 9:30 PM, Steven Kang wrote: Hi all R users, I am trying to extract elements from an array (x as shown below) where the difference between the consecutive elements does not equal 1. The desired output is: j = 6,17,27,38,58,69,79,90 However, the code belo

[R] Appending elements according to criteria to an empty array

2009-08-20 Thread Steven Kang
Hi all R users, I am trying to extract elements from an array (x as shown below) where the difference between the consecutive elements does not equal 1. The desired output is: j = 6,17,27,38,58,69,79,90 However, the code below only returns: j = 1,69,79,90 I am a