Thank you for the email.  The data is unbalanced, meaning that some days are
missing.  So the sequence of days could be something like Tuesday,
Wednesday, Friday, Monday.  The diff function would produce 1, 2, 3.  But I
would like it to produce 1, 2, 1 since there is really only 1 day between
Friday and Monday.  Thank you.  Geoff

On Mon, May 23, 2011 at 10:09 AM, Jeff Newmiller
<jdnew...@dcn.davis.ca.us>wrote:

> Your request seems bizarre to me. If you really want to ignore the actual
> time intervals, just do your analysis without the actual dates.
>
> If you just want forward-looking time intervals, then put them in the
> correct index locations.
>
> ?diff
>
> c(diff(DF$DATE),1)
> ---------------------------------------------------------------------------
> Jeff Newmiller The ..... ..... Go Live...
> DCN:<jdnew...@dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
> Live: OO#.. Dead: OO#.. Playing
> Research Engineer (Solar/Batteries O.O#. #.O#. with
> /Software/Embedded Controllers) .OO#. .OO#. rocks...1k
> ---------------------------------------------------------------------------
>
> Sent from my phone. Please excuse my brevity.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to