> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Worik R
> Sent: Sunday, February 28, 2010 9:37 PM
> To: r-help
> Subject: Re: [R] Expanding a data structure
>
> > change <- c(NA, diff(q1$..1
> change <- c(NA, diff(q1$..1))
> will be 1 when ..1 goes from FALSE
> to TRUE, -1 for TRUE to FALSE, 0 for no change, and NA
> for the first element. You may find it convenient to
> change that NA to something else or to not deal with
> the first element after computing the diff.
>
>
This is ve
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Worik R
> Sent: Sunday, February 28, 2010 5:22 PM
> To: r-help
> Subject: [R] Expanding a data structure
>
> I have a xts object with logic
I have a xts object with logical data .
> tail(q1)
..1
2010-02-19 TRUE
2010-02-22 FALSE
2010-02-23 FALSE
2010-02-24 FALSE
2010-02-25 FALSE
2010-02-26 FALSE
>
I want to build a xts that records the dates that there is a change. If
TRUE -> FALSE it is "down" if FALSE -> TRUE it is "u
4 matches
Mail list logo