> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Tim Clark
> Sent: Thursday, February 11, 2010 10:53 AM
> To: r-help@r-project.org
> Subject: Re: [R] Find each time a value changes
>
> It was brought
Ben Tupper
> Subject: Re: [R] Find each time a value changes
> To: r-help@r-project.org
> Cc: "Tim Clark"
> Date: Wednesday, February 10, 2010, 4:16 PM
> Hi,
>
> On Feb 10, 2010, at 8:58 PM, Tim Clark wrote:
>
> > Dear List,
> >
> > I am trying t
gt; From: Ben Tupper
> Subject: Re: [R] Find each time a value changes
> To: r-help@r-project.org
> Cc: "Tim Clark"
> Date: Wednesday, February 10, 2010, 4:16 PM
> Hi,
>
> On Feb 10, 2010, at 8:58 PM, Tim Clark wrote:
>
> > Dear List,
> >
> >
Hi,
On Feb 10, 2010, at 8:58 PM, Tim Clark wrote:
Dear List,
I am trying to find each time a value changes in a dataset. The
numbers are variables for day vs. night values, so what I am really
getting is the daily sunrise and sunset.
A simplified example is the following:
x<-seq(1:100)
something like this?
> c(1, which(c(0, diff(y)) != 0))
[1] 1 11 21 51 61 71 81 91
Bill Venables
CSIRO/CMIS Cleveland Laboratories
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Tim Clark
Sent: Thursday, 11 February 2010 11:59 A
5 matches
Mail list logo