(.days){
> + .diff <- cumsum(c(TRUE, diff(.days) != 1))
> + max(table(.diff))
> + })
>> contig
> 2001 2002 2003 2004 2005
>41224
>>
>>
>
>
> On Thu, Oct 1, 2009 at 11:29 AM, gd047 wrote:
>>
>> ...if that is
...if that is possible
My task is to find the longest streak of continuous days a user participated
in a game.
Instead of writing an sql function, I chose to use the R's rle function, to
get the longest streaks and then update my db table with the results.
The (attached) dataframe is somethin
2 matches
Mail list logo