On Wed, 27 Jan 2010, Gregory Gentlemen wrote:
Dear R-users,
Say that I have a sequence of zeroes and ones:
x <- c(1,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0)
The sequences of ones represent segments and I want to report the
starting and endpoints of these segments. For example, in 'x', the fi
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Gregory Gentlemen
> Sent: Wednesday, January 27, 2010 9:31 AM
> To: r-help@r-project.org
> Subject: [R] Function for describing segements in sequential data
Hi,
On Wed, Jan 27, 2010 at 12:31 PM, Gregory Gentlemen
wrote:
> Dear R-users,
>
> Say that I have a sequence of zeroes and ones:
>
> x <- c(1,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0)
>
> The sequences of ones represent segments and I want to report the starting
> and endpoints of these segments
Dear R-users,
Say that I have a sequence of zeroes and ones:
x <- c(1,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0)
The sequences of ones represent segments and I want to report the starting and
endpoints of these segments. For example, in 'x', the first segment starts at
location 1 and ends at 3,
4 matches
Mail list logo