Skip to main content
18 events
when toggle format what by license comment
Jan 16, 2018 at 15:03 vote accept ramesh
Jan 16, 2018 at 2:18 comment added Edmund @kglr Ah, I see. You are creating multiple indexed variables. The symbols/values precede the blank in the pattern match. Clever. I have not considered that.
Jan 16, 2018 at 2:11 comment added kglr @Edmund, it is initialized to 1 for any possible value of its argument; for every x , every time a sequence with x in the first slot is encountered, e,g, Sequence[x, y_], the current value of cnt[x] is appended to the sequence (to get {x, y cnt[x]}) and cnt[x] is incremented. ... Is this in any way an answer to your question?
Jan 16, 2018 at 1:34 comment added Edmund @kglr How does your cnt[#]++ work?
Jan 16, 2018 at 1:14 history edited kglr CC BY-SA 3.0
deleted 31 characters in body
Jan 16, 2018 at 1:06 history edited kglr CC BY-SA 3.0
edited body
Jan 15, 2018 at 23:58 history edited kglr CC BY-SA 3.0
deleted 10 characters in body
Jan 15, 2018 at 23:52 history edited kglr CC BY-SA 3.0
added 445 characters in body
Jan 15, 2018 at 23:29 comment added kglr @ramesh, glad you found them useful.
Jan 15, 2018 at 23:28 comment added ramesh I think it should work. I will apply it to my data and update you. Thank you so much kglr. You have helped me by answering most of my questions. I owe you more than I can pay!
Jan 15, 2018 at 23:13 comment added kglr @rames, please see the update.
Jan 15, 2018 at 23:13 history edited kglr CC BY-SA 3.0
added 213 characters in body
Jan 15, 2018 at 23:06 comment added kglr @ramesh, good point. I will post an update if i find a better solution.
Jan 15, 2018 at 22:56 comment added ramesh @ kglr, thank you for your answer. One of the problem of using gatherby (at least for me) is that it rearranges data based on id variable. Is there any way to keep the order of id variable the same. Thank you.
Jan 15, 2018 at 22:47 history undeleted kglr
Jan 15, 2018 at 22:47 history edited kglr CC BY-SA 3.0
added 43 characters in body
Jan 15, 2018 at 22:42 history deleted kglr via Vote
Jan 15, 2018 at 22:41 history answered kglr CC BY-SA 3.0