-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 01/06/2011 11:57 PM, (Ted Harding) wrote:
> On 06-Jan-11 22:16:38, array chip wrote:
>> Hi, I am seeking help on designing an algorithm to identify the
>> locations of stretches of 1s in a vector of 0s and 1s. Below is
>> an simple example:
>>
>>> d
Thanks very much Bill, good catch!
John
From: William Dunlap
Cc: r-h...@stat.math.ethz.ch
Sent: Thu, January 6, 2011 3:52:47 PM
Subject: RE: [R] algorithm help
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of array chip
> Sent: Thursday, January 06, 2011 3:29 PM
> To: ted.hard...@wlandres.net
> Cc: r-h...@stat.math.ethz.ch
> Subject: Re: [R] algorithm help
>
97 971
John
From: "ted.hard...@wlandres.net"
Cc: r-h...@stat.math.ethz.ch
Sent: Thu, January 6, 2011 2:57:47 PM
Subject: RE: [R] algorithm help
On 06-Jan-11 22:16:38, array chip wrote:
> Hi, I am seeking help on designing an algorithm to identify the
>
On 06-Jan-11 22:16:38, array chip wrote:
> Hi, I am seeking help on designing an algorithm to identify the
> locations of stretches of 1s in a vector of 0s and 1s. Below is
> an simple example:
>
>> dat<-as.data.frame(cbind(a=c(F,F,T,T,T,T,F,F,T,T,F,T,T,T,T,F,F,F,F,T)
> ,b=c(4,12,13,16,18,20,28,
try this:
?rle
Carl
**
From: array chip
Date: Thu, 06 Jan 2011 14:16:38 -0800 (PST)
Hi, I am seeking help on designing an algorithm to identify the
locations of stretches of 1s in a vector of 0s and 1s. Below is an
simple example:
> dat<-as.data.frame(cbind(a=c(F,F,T,T,T,T,F,F,T,
6 matches
Mail list logo