« first day (209 days earlier)      last day (3314 days later) » 
00:00 - 17:0017:00 - 00:00

00:20
reshape() needs a default direction
reshape needs a lot more than that
Oh, finally an R guy...
Think you people shows the power.
 
3 hours later…
03:15
@DavidArenburg Here's one for you: stackoverflow.com/questions/33748175/…
yeah, i was just looking at the same thing:
huh, looks like comments aren't getting expanded -- anyway, guy saying data.frame > mutate is faster than cbinding vectors
Oh, he deleted it.
ok, glad my downvote served its purpose
Hmmm
> microbenchmark::microbenchmark(
+ tim   = cbind(A, B, pmax(A, B, na.rm=TRUE)),
+ user  = data.frame(A, B) %>% mutate(AB = pmax(A, B, na.rm = TRUE)),
+ times = 10
+ )
Unit: milliseconds
 expr      min       lq     mean   median       uq      max neval cld
  tim 481.4652 493.9767 494.3961 495.2668 497.0107 499.6504    10   b
 user 210.8483 210.8898 212.9703 210.9039 211.0029 231.3530    10  a
ack
guess i don't know what i'm talking about
is that on a larger example?
03:28
Yeah on:
A <- rep(A, 10e5)
B <- rep(B, 10e5)
i think you must have a typo
> microbenchmark::microbenchmark(
+ tim   = cbind(A, B, pmax(A, B, na.rm=TRUE)),
+ user  = data.frame(A, B) %>% mutate(AB = pmax(A, B, na.rm = TRUE)),
+ times = 10
+ )
Unit: microseconds
 expr     min      lq     mean   median      uq      max neval cld
  tim   5.896   6.517  10.5195   9.1540  12.102   20.170    10  a
 user 615.641 628.365 696.4137 633.6395 659.084 1230.973    10   b
i just copy-pasted yours and saw that... so i don't know what's going on...
it actually does make sense to me that the data.frame way could be faster. i dunno now
On a small sample this is what I get, when I tried with a larger one, I get the above results.
Have you tried with large A and B ?
oh right, i forgot to run your multiplier step, now i'm seeing the same thing. yeah, it does make sense that mutate should be faster than cbind
and... it's very likely the case that the op should use a data.frame if this is the sort of operation they're doing
whoops, shouldn't've downvoted
i'll try to be less trigger happy next time
03:35
:)
How would data.table compare on the benchmark ?
should be comparable, though [.data.table has extra overhead. gonna check?
microbenchmark::microbenchmark(
dplyr  = data.frame(A, B) %>% mutate(AB = pmax(A, B, na.rm = TRUE)),
DT  = setDT(list(A,B))[, AB := pmax(A, B, na.rm = TRUE)],
justpmax = pmax(A,B),
times = 10
)

Unit: milliseconds
     expr      min       lq     mean   median       uq      max neval cld
    dplyr 854.7635 858.4828 863.0581 860.4776 866.4064 876.2322    10  a
       DT 878.3649 885.8416 897.2747 892.0091 908.6812 925.2861    10   b
 justpmax 855.0124 860.0458 865.3843 863.6564 873.7097 875.8555    10  a
so, dplyr has zero overhead in using data.frame vs data.table's setDT(list()), seems. still, basically the same
Yeah I get:
Unit: milliseconds
 expr      min       lq     mean   median       uq      max neval cld
  tim 490.2311 493.7472 508.1939 496.6052 503.5905 557.3391    10   c
 pmax 209.7954 209.9048 213.3358 209.9497 216.8580 225.0117    10 a
 user 211.0573 211.1058 212.3374 211.1708 211.4994 218.0932    10 a
   dt 264.3644 276.6424 294.7813 279.3102 336.3603 341.1688    10  b
i'm so used to seeing order-of-magnitude differences that i consider +50% cost fine :)
Agreed :)
@Frank, @StevenBeaupré, at best, that answer should have been a comment to the original answer. cbind might be a little slower because it has to figure out what is being "bound". If you used data.frame instead of cbind you'll probably also see different results.
03:49
@AnandaMahto Exactly, the whole point was user shamelessly recopying Tim's pmax idea
Glad to see you around BTW :)
I'm around. Just not finding the time for SO these days.
And, our internet has been out for the past week with the rains we've been having.
yeah, agree it should've been a comment. the key part of the answer is the pmax
How do you generalize the "dplyr" approach if you have multiple columns and don't want to manually type the column names?
painfully
i would do DF %>% mutate(my_pmax = do.call(pmax, c(.[], na.rm=TRUE))) if i had to use dplyr. Steven would know the proper idiom, maybe involving interp...?
 
1 hour later…
05:03
I had a feeling, that you would be the first one to reply and solve this, thanks a lot akrun., but my question is will this handle the case mismatch, "org" is lower case while "organization" is sentence case — user3875610 31 mins ago
Well yeah, there's like a 1 in 3 chance he will answer it.
 
1 hour later…
06:12
Oooh, she's offering a bonus stackoverflow.com/questions/33750203/…
I bonus to close
No respect for the person that upvoted that.
 
1 hour later…
07:26
good morning!
08:20
Hi @Jaap !
good morning @CathG
08:36
Hello
hi @Tens
@RichardScriven Killed
@Frank I have 26, what is that query about?
Good morning
hello @zx8754
close as unclear?
0
Q: Working out averages across selective cells

lhaqI'm trying to work out the average for each participant. there are 50 participants. However for each participant I need to work out the mean then received on the incongruent trial and they received on the congruent trial. How do I work out the means for congruency "1" only?

morning btw
08:49
Hi @Tensibai @zx8754 @DavidArenburg
@zx8754 i've got a score of 31
we should be able to nominate a group for a moderater position; GMT would do quite well I guess ;-)
My score is 15
There is only josilber with R tag
08:54
@zx8754 it's about how well you score for a nomination
he went viral this guy
got to second place, pretty astonishing
hi @David ! how do you compute the score ? (I probably missed the explanation yesterday, I had to leave early, my small one was kicked out of the nursery because of a conjonctivitis :-S and actually, she also have otitis : didn't go to the doctor for no reason :-) )
@CathG follow the answers to arrow
You'll find a sede query, add your userid and it will give you your score
@CathG you are 18, so dont bother :)
mainly rep/1000 up to 20, and number of badges in moderation/edition
08:59
@CathG you can find it here
awww, coderanger has ended he's work. he's back on SO, I'll wont be able to answer any Chef question now :p
thanks @Tens and @Jaap ! :-)
@Tensibai is he so good in chef?
@DavidArenburg :-p that's still more than some of the candidates!
@Jaap yep, one of the main contributor to the code base
09:01
@Jaap my guess he is the akrun of chef
@CathG yeah, there some very lame candidats there
@DavidArenburg with less self awareness maybe
I.e: he don't give a shit about rep
@Tensibai and apparently also doing dev rather just SO whole day
speaking about rep: I've never been so close to 10K :-)
@CathG the guy with the tree pick is really annoying
I mean, grow up man
09:03
@CathG oh we need to stop this madness
@DavidArenburg ahah I didn't even read his text, I'm gonna now!
I assume he did find a way to monetize the help, he did become a mod for the chef mailing list, so I assume there's a kind of remuneration to him
@CathG the pic is very inappropriate IMO, especially for a mod
@Tensibai he developed an Python API for Chef, interesting
wonder if ti will make sense to make one for R
@DavidArenburg I didn't even notice that, hardly looked at the pic (and I didn't understand why, based on the text, you found him childish). Ok, now I've seen, and, well, it's even more ridiculous than inappropriate imo
@DavidArenburg I'm unsure this would add anything
09:15
@CathG Challenge - if you get to 10K by the end of this month, I will speak to Santa to get you an additional Christmas present :)
Haha Jason Bourne is on the voting, too
@zx8754 then I should at least have until the 25th of december ;-p and you can speak to him anyway because if I'm not 10K by then, I'll need a present to cheer me up ;-)
@CathG No, I got this deadline from Santa himself, he needs 3 weeks notice
09:37
Morning all
@germcd hi
Morning guys
hi Teo
Hi @RomanLuštrik
morning @germcd @LyzandeR @RomanLuštrik
hi @germcd, hi @LyzandeR, hi @Roman
09:52
Ciao a tutti.
Hi @David, @LyzandeR, @Jaap, @Cath, @Roman
this hi ritual is amuzing
2
10:08
n*(n-1)/2
@germcd jeopardy ? what is the sum of the first (n-1) integers (sum(1:(n-1))) ?
@CathG that's right but I was thinking of number of handshakes
@germcd :-)
@germcd or the number of needed "hi"'s?
let's continue ;-)
hi @Heroka
goodmorning all!
10:15
@Cath, @Jaap yee both get a star
@Heroka hi
hi @Heroka
hi @Heroka :-)
we might do some text-analysis for "hi" on the logs of this room ;-)
my comment:
Do not post your data as an image, please learn how to give a reproducible exampleJaap 23 mins ago
response:
Hi, can you please elaborate. — Rishi Nad 6 mins ago
retorical question: should I?
This can be an easy question to answer. Does anyone know if plyrmr supports date/time objects? stackoverflow.com/questions/33752447/posixct-and-plyrmr
@DavidArenburg My response next time will be "Valar morghulis". I don't know if I used it already, but sounds kinda cool.
@Jaap Perhaps user doesn't understand due to language barrier?
10:20
@Jaap did it for you :P
lol :-)
@RomanLuštrik according to Google Translate that is Swedish, but it gives a crappy translation
(something about whales)
[how do you guys get the nicely formatted comments when you copy-paste them?]
@Jaap It's high Velyrian from A song of ice and fire. It means 'all men must die'.
aha, Game of Thrones
10:25
@Heroka just copy/paste the link to the comment :-) (I asked the same question some weeks ago ;-) )
@CathG thanks!
10:43
@heroka, still no news after the flagging ? I had a downvote on saturday, I'm quite sure it's from the guy from the "boxplot on binary data" I downvoted... and after that some wonder why nobody left comment to explain a downvote ;-)
@CathG nope, nothing. I fear we'll just have to accept it as a result of not coddling people, I hope that if things get excessive there will be mod-interventions.
@germcd we should ban greetings
@Heroka maybe... it's a shame though because that's how lots of downvotes don't get explained. There should be an automatic way to check if some downvote can come from revenge... (like check if the downvoted downvoted some answers from the downvoter in the past days...). the A of mine that got downvoted had 2 upvotes and was accepted so if not revenge, I really would have appreciated an explanation...
Though in your case, you didn't actually downvote something, just talked to the guy, right ? that would be complicated to check...
@CathG I talked to the guy/gal I think, don't exactly remember it. I agree; downvotes (especially of accepted/upvoted answers) should be accompanied by a comment why.
Hi all :-)
10:55
@zx8754 We should all just nod at the screen
hey @Avinash !
I donno why close votes are not considered as flag count..
3
this also helps for site moderation..
ahh, html and regex?? If I answer to this question (regex solu), I don't and won't get any upvotes. — Avinash Raj 1 min ago
lol :-)
11:13
Tsss
Regex are prefectly valid for this kind of grep in non nested elements
"I wish to grep line with 'this' => Use an html parser for this " This always drive me nut
NO offense bro @AvinashRaj this not Facebook to get likes. thats what I thought so. — Baks 4 mins ago
lol...
11:36
classic. I answer question in comments (as very small/FAQ-like issue), OP answers him/herself :P
@Heroka same yesterday
@Jaap to be fair they made it into wiki, oh thanks to you Jaap :)
@zx8754 after I hinted to that direction ;-)
11:56
@AvinashRaj good question for meta
@zx8754 which might help @AvinashRaj in getting the requirements for moderator ;-)
Chameleon questions - you've got to love them.
@DavidArenburg AKA edit porn
"Your code doesn't work on my real data - see my entirely new data set with completely new expected output- why isn't this working?"
6
@zx8754 If you must relate to this specific movies genre, then yes I guess :)
@DavidArenburg I will leave the genre to your imagination
12:32
@zx8754 I do grammatical mistakes. That's why I'm not running for mod..
@Jaap ^^
13:05
tool-request?
0
Q: Alternatives of ctree in R when using with Asp.net

G--I have to work with ctree()(Conditional Inference Trees) in my Asp.net project,i know ctree is directly not supported, so i am looking for the alternatives which i can start with. i came across r.net, but i cannot use it, as it requires executable to be installed on client side, i went through t...

@Heroka yep, voted !
last vote here please (I wonder if the question should be tagged [regular calculator]...
@CathG lol
@CathG if you upvote 20 of my posts each day for three days, I'll gladly cast a close vote on that. :)
4
I think we are currently have highest presence in the room all time
@TZHX heh
@TZHX wouldn't work, the votes would get reversed ;-p
13:16
@CathG oh yes. forgot about that.
no meta-effects :P
2 posts a day for 30 days then? :)
@TZHX that could do, but no need, the post is closed ;-p
@TZHX I don't think I've ever seen one of your post actually :-/
most of my posts are shit, to be fair.
@CathG he is python
13:18
@TZHX Python and C++ : I wouldn't know o_O
and bunch of ther language you dont know :)
I'm not clever enough to answer good questions, and most of the easy questions by the time I've hunted down a duplicate someone's already answered.
sometimes I'll answer an easy question to see what happens, but it never seems to work for me like it does for some others.
@TZHX sounds just like me :-)
was just going to say that..
@TZHX what happens then?
I might get an occasional upvote, or accept, or nothing at all.
13:20
@DavidArenburg yeah, might as well serve myself ;-)
while often I've commented with the obvious answer, someone's come along and posted it later spoon-feeding the OP, and gets upvotes.
@TZHX yeah, very common on SO
@TZHX that happens too often. Even more annoying when they don't give credit in the answer.
so I'm just resigned to the slow, slow climb to 3k so I can start actually voting to close things, rather than just raising flags and having them disputed by people who don't know what they're meant to be reviewing.
I guess many people on SO believe that votes serve solely for the purpose of indicating if the answer is correct/helpful or not. Regardless where it was stolen from and who was killed in the process.
When some Googler which isn't familiar with SO finds this Q/A, he doesn't really care neither, he just lurks the answers, finds what he needs, and forgets that SO even exsists
13:40
Hi @DavidArenburg with PyCharm, when you want to look at the args of a function. Do you use Ctrl+Click?
@PierreLafortune hi, I don't remember, havn't use it a while. Maybe ask Avinsh or TZHX
@PierreLafortune hmm, is it me or akrun started answering python questions?
lol I just saw that
stackoverflow.com/questions/33750947/…. No meta effect though pls
/me hasn't used pycharm before, sorry.
@PierreLafortune interesting
wondering if pandas worth learning
@TZHX In R, to see the function parameters for read.csv, there are a few ways. 1) typing the function without parantheses read.csv, 2) help screen ?read.csv, 3) Google. What do Python users do?
13:45
it seems like everything is piped there
@DavidArenburg It behaves very similar to R
@PierreLafortune also F2 in Rstudio
yes, I can see
and i can understand the code too
I just wonder if it worth the time
I think so.
like why would i use it instead of data.table?
@PierreLafortune why?
13:47
For communication with other data people. In R we can sometimes feel like we're on an island
There's cool stuff happening in data science with Python and R users both. The languages are converging. Inevitable that a data scientist will need to be familiar with both. Then you add Scala, and Julia to the mix..
print theFunctionName.__doc__ ?
or the help() function?
but more often, google.
@TZHX thanks that helps
14:11
is it me or this answer is OT ?...
@CathG how so?
Because if the data were already in columns, OP probably wouldn't have a problem.
@PierreLafortune well, there is no df1, the OP has a text file, so, if the answer is not OT, it's at least incomplete with first a way to import the data that makes each "part" a column... because that's probably where the OP has a difficulty...
@CathG commented on it.
@Heroka right, exactly what I was thinking but better said ;-)
14:16
hi all
@Heroka and akrun reacts fast ! I don't see how the data and description are different but anyway, he says he will delete...
@CathG it is a place-holder until OP responds, then edit edit edit, get vote get accepted... typical process for helping crap posts.
hi @Fran :-)
this fellow came back from being afk, found that the dupe answer was fine and did add an example. just thought i'd mention it in case anyone wanted to reverse their downvote... stackoverflow.com/q/33744822/1191259
I'm trying to suppress my snark and be kind to people :P
14:17
@zx8754 yep that sounds likely
@Heroka please don't
@Frank didn't (down)vote on this Q
@zx8754 why not? within limits off course.
@CathG ok. i'm being blinded by your stars here :)
2
@Heroka best fun is when walking on the borderlines :)
14:20
@Frank rofl (you know sometimes they are not (all) mine :-D )
2
@zs8754 I found myself crossing them too often, and it wasn't always helpful.
:)
@CathG statistics would disagree
@zx8754 and I always hit 's' instead of z....
@Heroka I noticed! thought it was easy to type... zx then 87 54 on numpad, well that was the idea 10+ years ago
14:31
@Frank i think we can just close it as the OP proposed so
yeah, just saw, thanks Jaap
14:50
People wanting the impossible stackoverflow.com/questions/33759393/…
@Heroka gone
person wanted to write all combinations from 1 to 100 out of 100 to file. that file would be bigger than the entire internet :P
2
Good afternoon everyone !
Hi @etienne, welcome here
That question about the combination de was just fantastic
With a data frame like:
1 apple A,C,D,F
2 pear A,D
3 plum B,F
4 banana K,P,Z
5 orange B,C,D,H
Isn't there a dplyr/tidyr function that separates into rows instead of columns? I remember seeing it
Oh yes, splitstackshape does it cSplit(df1, "V3", direction="long") There's a long argument
@CathG yep, close as unclear
but Arun doesn't seem to be shocked... (then I am a bit....)
@Jaap, and he asked a question for you ;-p
15:37
typo. @Jaap, you agree on my comments or do they sound rude ? (because that's really not the way I mean them so I hope they don't...)
@CathG nah, i agree with Arun that the q is okay: example, attempt, desired output all check out, and, hey, even words describing what they're trying to do -- so yeah, way above average
@Frank well, depends where the average is...
the average is through-the-floor low, yep
Well, being drown in code before the actual question troubles me, as having stuff that shouldn't be there... (like anything else than the cumsum)... Anyway, the Q is only a typo so definitely not useful to others...
@arun retracted, although I think the Q is poorly worded and confusing by introducing get
15:43
@CathG oh, is it just the 0 vs "0" thing? i didn't really try to figure it out
if so, i'd be fine closing as typo, but none of the comments seemed to give a hint as to the source of the trouble so far
@Frank no it's the col4 instead of get(col4) (the OP just forgot as they use get for the previous columns)
ah ok
@Frank the comment that Arun converted after to an answer does ;-)
The last line should be head(get(Col4), -1).. — Arun 33 mins ago
ah, guess i'm just blind
lol
15:46
:)
anyway, the Q is answered and Arun stated the problems in his answer so :-)
yeah, another problem: really weird to overwrite Col_3 in this way
surprised that all the mod candidates have positive net votes
is it possible to have a df that have v1$v2 as variable ? I have trouble understanding an OP's data structure (which is obviously different from what they posted...)... or maybe I just have understanding problem today o_O
@Frank proves there are more goodies than baddies in this world
16:01
i don't know about that...
at least on SO
well, gtg back to my own little world with just goodies (most of the time...)
have fun, bye !
cya Cath
@Jaap the issue with the Q is get. The Q is unconventional (in creating the example), but not unclear. But glad that you retracted. I don't think everyone gets voting right all the time, but I wanted to point it out here, so that people are slightly more cautious. All good.
@Arun :-)
@CathG I don't agree with your comment, but they don't sound rude. No worries.
16:17
@Arun I agree on the don't close (Q is valid) but worth downvote as unhelpful to anyone else in future
Avoided meta effect, I din't act on it
@Tensibai it's not the definition of 'useful' from SO's POV AFAICT: Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers
I stand on the other side, vote to close (but not as unclear, but as typo/cannot be reproduced etc..), and not down-vote.
@Arun I agree on the definition, but the question on itself start with a so flawed thinking that I hardly think someone will find it usefull at any point in time
If it's really a typo, why not
um.. what's the flawed thinking here?
Maybe the term is wrong, starting with a DF, converting to DT with column selection.. too much noise when you relate to the title
The question itself is about the cumsum, there's too much noise around for it to be usefull IMO
@Tensibai OP has provided a reproducible example (maybe not in the way you like it). And it's easy to figure out where the actual code starts. It perhaps doesn't deserve up-votes (as CathG mentioned), but I don't see a reason for down-vote either.
16:25
@Arun I feel it useless for someone searching about cumsum in the future
Indeed, a close vote for typo is a valid point of view
@Tensibai the Q is about OP not able to debug the issue with his code. Once we spot it, we usually close it. I've not seen anyone down-voting a Q because it's about debugging code (which invariably isn't useful for others in most of the cases).
@Tensibai thanks. IMO, a down-vote isn't.
i've downvoted debugging requests, usually when the op just code-dumps their entire script
@Frank I've already quoted above on what SO considers acceptable.
Well, I agree close votes and up/down votes are unrelated, but usually if a question worth a close vote as not useful (typo), it clearly means it is not usefull, so may worth a downvote....
Quoting the close as typo: " While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. " this sounds like a definition of 'not useful'
@Arun yeah, i saw. i wouldn't downvote because it's about debugging per se, but being about debugging is correlated with my finding it unuseful, i guess
16:30
Main idea behind being to ask the OP to improve/reword the question to make it more generic/easiest to understand
anyway, i don't think any of us are really disagreeing here. downvotes are subjective to a large extent; and we know the current close reasons
I'm still talking about this particular Q :)
@Tensibai I disagree. It says.. "it's unclear or not useful", not and. The Q is clear here, IMO.
@Arun yes... So not useful alone worth a downvote
Do you down vote every Q you close?
16:33
@Arun depends on the close reason
Why are you closing if it's useful?
And why do you think debugging Q aren't useful?
There's 'Too broad' questions I don't vote on either
@Arun I'm not speaking as a generic, I'm talking about this particular question
A debugging question where the result are false because of a misunderstanding of a function could be exactly on topic and worthwhile
And you'd down-vote for that? Even when the OP has made a MRE and provided his attempt?
That seems to make no sense. Closing it as not really relevant for future readers makes sense.. but down-vote doesn't. I'm sorry. I disagree with your entire premise.
@Arun no problem ;)
I'm not trying to convince anyone, just discussing about it
@Frank thanx for the edit, added an extended example now :-)
16:42
@Arun all in all I've the feeling the OP fail to express his real problem
@Arun and side note: your answer is nice, nicely explaining what's wrong in the code
but I still can't get my head around the col based on col4 and col4 based on col3 ...
sounds like there's an infinite recursive loop
np, Jaap, nice answer
on that point, considering adding this comment to the Q or A...

More a mathematical thing than a bug, but they could've greatly simplified things with `mydata.table[, (Col3) := get(Col3)*(1+cumsum(get(Col2)=="A")*get(Col1))]` thereby skipping creation of `Col_4`.
Hum.. I've the feeling this would give different results
1+cumsum <- we never end with 0 here
yeah, looks like it doesn't match their output
intended to be 0+ ?
(to cast logical to integer ?)
but that's only because their Col_4 is inconsistent between input and output. Arun's answer also gives different vals
@Tensibai nah, deliberate. it goes 1....1.05....1.10 as it should
16:56
@Frank Col4 is based on Col3, and I think OP wish it t update when Col3 is updated
Kind of infinite recursion as far as I understand it
nah, Col_4 is just incrementing Col_3 by a percentage (in Col_1) each time lag of Col_2 == "A"
mydata.table[, (Col4) := ifelse( get( Col2 ) == "A" , get( Col1 ) * get( Col3 ), "0" ) ] <= there's a 0 here ?
so mydata.table[, (Col3) := get(Col3)*(1+cumsum(shift(get(Col2),fill="")=="A")*get(Col1))] would be consistent with their code. however, judging by their desired output cumsum isn't even the right approach
00:00 - 17:0017:00 - 00:00

« first day (209 days earlier)      last day (3314 days later) »