« first day (1254 days earlier)      last day (2256 days later) » 

5:56 AM
I may have been too hasty closing this: https://stackoverflow.com/q/52530123/5977215
I think it's slightly different because it needs a bit of regex-ing on the column names
reopened
@SymbolixAU yup. I agree. Not exactly a duplicate.
6:32 AM
Morning all
Hi everyone :-)
ok..this is very annoying I can't find duplicate for this stackoverflow.com/questions/52530678/…
@RonakShah I also tried and could not find one
The closest I got was the cumsum(c(1, diff(x) > 0)) thing
6:51 AM
@RonakShah probably because question is "too simple", I only find more complex Q&A...
@RonakShah I don't see how cumsum(df$a==1) will start at 1 if vector does not ;-p
@RomanLuštrik Yes, it's awesome. Not completely caught up yet though.
@Cath I assume all elements before 1 will be FALSE so group 1 (not the first group since that will be 0) will start at 1
@Sotos what I meant is cumsum(df$a==1) is the exact same as cumsum(df$a) as all values are either 0 or 1 ;-)
@Cath what I meant was if it starts with 2 or 3 or 4 or any other number ..
@RonakShah I thought it was because of the constraint that df$b has to start at 1 whether a starts at 1 or 0. Considering OP description, it is not possible to have anything else than 0 or 1
7:09 AM
I have never received this many upvotes on a comment.. :D
@Cath true dat :D
I finally found something on 4th page of google result stackoverflow.com/questions/46287672/…
but the answer is in comments -_-
@RonakShah <sigh> I guess an answer with just cumsum is too simple to really post?...
maybe anything using cumsum will do ? I found an apply(df, 1, cumsum) that might be ok, what do you think?
@Cath not exactly sure, if it would answer OP's question.
@RonakShah There is a badge for that too :)
7:18 AM
I have finally closed it....
@RonakShah I received more than 15 upvotes on a comment once, but the comment was deleted...
@RonakShah lol... the most obvious thing to search for cumsum
@RonakShah nice find ! :-)
@Sotos I tried that ([r] cumsum is:answer) but did not find the post Ronak found. I didn't gp after 1st page though :-/
7:34 AM
@Cath I searched "cumsum in R site:stackoverflow.com"
google with site is often better than SO search...
true
8:58 AM
Hello
Hey zx
@RomanLuštrik after "breaking bad", it seemed lame (felt like they are trying to milk the dead cow...), I only watched couple of episodes, though. Might give it a second chance.
About your Q, maybe worth adding javascript tag, there might be a hacky way of doing it.
 
2 hours later…
11:19 AM
@zx8754 All pre-quels are cash cows. This one is OK for my taste.
If you're into prequels, try Black sails. Don't research into prequel to what it is, try guessing. :)
@RomanLuštrik Agreed. However i thought 'The hobbit' was a very good prequel
Can't say I appreciated LOTR as much as my friends.
Tried reading the book, but quit after pages and pages of names of who was at the party.
12:07 PM
@RomanLuštrik part of LOTR are tedious, kind of "I've no clue where I'll go on from now but I need to make a break in the story before continuing it"

« first day (1254 days earlier)      last day (2256 days later) »