Re: [Rd] HOW TO AVOID LOOPS

2008-04-14 Thread Bill Dunlap
On Mon, 14 Apr 2008, Stephen Milborrow wrote: > > Le sam. 12 avr. ? 12:47, carlos martinez a ?crit : > > Looking for a simple, effective a minimum execution time solution. > > > > For a vector as: > > > > c(0,0,1,0,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1) > > > > To transform it to the following vector wi

Re: [Rd] HOW TO AVOID LOOPS

2008-04-14 Thread Simon Urbanek
On Apr 14, 2008, at 4:22 PM, Stephen Milborrow wrote: >> Le sam. 12 avr. à 12:47, carlos martinez a écrit : >> Looking for a simple, effective a minimum execution time solution. >> >> For a vector as: >> >> c(0,0,1,0,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1) >> >> To transform it to the following vector w

Re: [Rd] HOW TO AVOID LOOPS

2008-04-14 Thread Stephen Milborrow
Le sam. 12 avr. à 12:47, carlos martinez a écrit : Looking for a simple, effective a minimum execution time solution. For a vector as: c(0,0,1,0,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1) To transform it to the following vector without using any loops: (0,0,1,0,1,2,3,0,0,1,2,0,1,0,1,2,3,4,5,6) Here is

Re: [Rd] HOW TO AVOID LOOPS

2008-04-14 Thread Greg Snow
are [EMAIL PROTECTED] (801) 408-8111 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of carlos martinez > Sent: Saturday, April 12, 2008 7:33 PM > To: r-devel@r-project.org > Cc: [EMAIL PROTECTED] > Subject: Re: [Rd] HOW TO AVOID LOOPS &g

Re: [Rd] HOW TO AVOID LOOPS

2008-04-12 Thread Martin Morgan
------------------ > -Original Message- > From: Martin Morgan [mailto:[EMAIL PROTECTED] > Sent: Saturday, April 12, 2008 5:00 PM > To: Dan Davison > Cc: [EMAIL PROTECTED] > Subject: Re: [Rd] HOW TO AVOID LOOPS > > (anonymo

Re: [Rd] HOW TO AVOID LOOPS

2008-04-12 Thread carlos martinez
adley -- -Original Message- From: Martin Morgan [mailto:[EMAIL PROTECTED] Sent: Saturday, April 12, 2008 5:00 PM To: Dan Davison Cc: [EMAIL PROTECTED] Subject: Re: [Rd] HOW TO AVOID LOOPS (anonymous 'off-list' response; some extra

Re: [Rd] HOW TO AVOID LOOPS

2008-04-12 Thread hadley wickham
On Sat, Apr 12, 2008 at 11:47 AM, carlos martinez <[EMAIL PROTECTED]> wrote: > > Looking for a simple, effective a minimum execution time solution. > > > > For a vector as: > > > > c(0,0,1,0,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1) > > > To transform it to the following vector without using any loops

Re: [Rd] HOW TO AVOID LOOPS

2008-04-12 Thread Dan Davison
On Sat, Apr 12, 2008 at 06:45:00PM +0100, Dan Davison wrote: > On Sat, Apr 12, 2008 at 01:30:13PM -0400, Vincent Goulet wrote: > > Le sam. 12 avr. à 12:47, carlos martinez a écrit : > > >> Looking for a simple, effective a minimum execution time solution. > > >> > > >> For a vector as: > > >> > > >

Re: [Rd] HOW TO AVOID LOOPS

2008-04-12 Thread Dan Davison
On Sat, Apr 12, 2008 at 01:30:13PM -0400, Vincent Goulet wrote: > Le sam. 12 avr. à 12:47, carlos martinez a écrit : > >> Looking for a simple, effective a minimum execution time solution. > >> > >> For a vector as: > >> > >> c(0,0,1,0,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1) > >> > > To transform it to th

Re: [Rd] HOW TO AVOID LOOPS

2008-04-12 Thread Vincent Goulet
Le sam. 12 avr. à 12:47, carlos martinez a écrit : >> Looking for a simple, effective a minimum execution time solution. >> >> For a vector as: >> >> c(0,0,1,0,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1) >> > To transform it to the following vector without using any loops: > >> (0,0,1,0,1,2,3,0,0,1,2,0,1,0,1,