[R] Regex in an IF statement?

Allan Engelhardt allane at cybaea.com
Fri Jul 23 16:31:45 CEST 2010


help("difftime") is probably what you want.

If not, please post a standalone example

Allan

On 23/07/10 15:18, Jim Hargreaves wrote:
> Dear List
>
> I have the POSIX timestamps of two events, A and B respectively. I 
> want an expression that tests if A occurs within 4 weeks of B.
>
> Something like:
>
> if (ts_A "is between" ts_B + 4(weeks) and ts_B - 4) ...
>
> Can probably done by regex but the regex docu for R says nothing about 
> if statements.
>
> Any help greatly appreciated,
>
> Regards,
> Jim Hargreaves
>
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list