« first day (946 days earlier)      last day (2361 days later) » 

1:11 AM
@Frank hahah..TBH, no. As I already said, there is one outer loop on top of this so my only concern is to accommodate the given answers in that loop.
 
1:43 AM
ah, fair enough, still a fun exercise :)
 
2:28 AM
There were many nice answers but I am going with @Jaap 's solution on that question because of it's intelligent use of setnames :)
2
 
 
1 hour later…
3:51 AM
 
 
3 hours later…
7:07 AM
hello @ all
who am I to object? ;-)
(but I prefer Frank's solution though)
 
Hello
 
If performance was the primitive concern then definitely it was Frank's but I think I can compromise a bit here on performance since my arrays are not too big.
 
7:27 AM
Morning all
 
7:50 AM
Good morning everyone :-)
 
@Uwe can an option for this be something like DT[, .N, by = g][, N := replace(N, is.na(g), NA)]?
 
Uwe
@Sotos or DT[, .N, by = g][is.na(g), N := NA][]
 
@Uwe Even better :)
 
I need your advice: I'm co-interviewing someone for a potential internship, she put 4/5 as R skills. What do you think would be the best questions to test that?
 
@Cath Many ways to approach that. It can depend on the nature of the internship
will she do more aggregating data? modeling? visualisation?...
 
Uwe
8:04 AM
@Cath Perhaps, you can find something among the highly upvoted [r] questions on SO?
 
@Sotos actually, what I'd like to test with the Q is more her honesty ;-)
@Uwe good idea !! thanks !
 
@Cath That too :)... Uwe's idea is spot on
 
Uwe
@Sotos Thank you for reminding me of data.table chaining!
 
Not many people are 4/5. I would say 1=just started using R, 2=I know basic commands, 3=I know packages, 4=I wrote packages, 5=I'm Dirk
 
6=I'm Hadley?
3
Or 5 and 6 are vice verse?
 
8:09 AM
@zx8754 I totally agree with that, I think she has a too good opinion of herself...
 
Replace 5 with any superhero.
 
@m0nhawk rofl
 
@Cath maybe test with Ronak's post, ask her to explain each answer.
 
@zx8754 ah, that can be a good idea, chosing some good Q&A and ask to explain. I can chose some of akrun's answers too to be sure the explanation is not already with the A ;-p
 
@Uwe np
 
8:12 AM
@Cath What about S3/S4 and internals of compiler package?
 
Yeah, I would only show the question and code(without comments).
 
Questions on Garbage Collector in R.
 
@m0nhawk well I need to understand the Q and know how to answer ;-D
 
@zx8754 Which Q?
 
@zx8754 yes, definitely a good way to see, I'm heading for a Q and actually Ronak's without explanation can fit perfectly
 
8:20 AM
12
Q: Match substring of two vectors and create a new vector combining them

Ronak ShahConsider two vectors. a <- c(123, 234, 432, 223) b <- c(234, 238, 342, 325, 326) Now, I want to match last two digits of a to first two digits of b and create a new vector pasting first digit of a, the matched part and last digit of b. My expected output is : [1] 1234 1238 2342 4325 4326 2...

 
or maybe with a more fundamental one
106
Q: Is the "*apply" family really not vectorized?

David ArenburgSo we are used to say to every R new user that "apply isn't vectorized, check out the Patrick Burns R Inferno Circle 4" which says (I quote): A common reflex is to use a function in the apply family. This is not vectorization, it is loop-hiding. The apply function has a for loop in its de...

:)
 
thanks guys, I went with Ronak's as I needed to do quickly, the interview is in 1 minute... hope it's gonna go well :-) I'll let you know when I'm back !!
 
8:37 AM
Or I turn out to be the interviewer :) — Jon Skeet Feb 2 '09 at 9:32
 
welcome @Oghli, you now have write access
 
welcome @Oghli
 
Hi there
@Cath FizzBuzz (print fizz for every multiple of 3, buzz for every multiple of 5 and FizzBuzz for every multiple of 15) kind of nice way to see if there's a sapply or a vectorized approach at first
 
8:57 AM
@Tensibai I would do that like this:
x <- 1:20

i1 <- x %% 3
i2 <- x %% 5

c('','Fizz','Buzz','FizzBuzz')[1 + (!i1) + 2*(!i2)]
 
(usual pitfall is people testing mod 3, mod 5 and mod 15 as combination of both)
 
Whoahh...This guy defined data.tables which piped together with %>% and applied the base R merge on them
All in one :p
 
At first glance it seems a rbindlist would be enough
 
Hello everyone

I want to ask about the community policy of down voting on posts

This question which i asked yesterday : https://stackoverflow.com/questions/47442507/how-to-get-javascript-functions-native-code

I didn't find any problem with the question and it's about important issue that I need to know about it

is there any policy to prevent just down vote without any logical reason on a post ?
 
9:16 AM
@Oghli There's no policy about votes, they are anonymous and everyone is free to vote as they are pleased
Now for the downvote: the question is 'I wish to know this function code to evaluate it, how can I do it ?' => There's no research effort shown, you're not very precise about which function you're interested in (or it's all questions)
 
It should be some kind of rule or policy to control anonymous down voting without any reason

I think it shouldn't depend only on the user reputation.
 
@Oghli There's plenty of posts on meta about this, the answer is still no, if someone wish to leave a comment, they can but nothing enforce it
 
@Oghli And there is a nice questions on this already: stackoverflow.com/questions/9103336/read-javascript-native-code
 
And even if you enforce it you'll end up with comments like 'I downvote this question because: fdlgfdigqzerigzekgdsfgdsjkfgqzdifhjkcvbsdjgfsd'
 
Which can be found by "javascript native code" search query.
 
9:22 AM
@m0nhawk Thanks for the info about the question.
@Tensibai you are right but may be we can find a good solution for this issue and suggest it to the community in order to control anonymous down voting.
 
For the records:
-48
Q: Should downvotes no longer be anonymous?

Ben ThurleyDownvotes are currently anonymous on Stack Overflow. I've not received many, but the two or three I can remember are usually on a question or answer that has significantly more up votes and in the case of a question been favourited. I'm not against downvotes, and I'm not so arrogant to believe t...

I let you follow the duplicates links to make your own idea on how this is received
 
9:39 AM
@Oghli My advise: don't stress about a vote here and there, someone might just have a bad day.
 
362
A: Should 'drive by' downvoting be more effectively caught?

Tim PostThe answer was down voted because I lost my keys. Please, stay with me, let me explain this odd chain of events. Earlier today I couldn't get to the store on time because I could not find my keys. That caused me to miss the opportunity to run over a golf ball, which would have bounced between a...

2
Mandatory link ;)
 
9:59 AM
@Natty tp
 
10:30 AM
So, it turned out she didn't even know substr, sub, ... so I didn't ask her for too long... I guess she's 4/5 if 5 is best level in her class... at least she was nice
 
10:46 AM
o_O
 
@Jaap yep exactly my reaction at the moment !
 
@Cath Very annoying when people overvalue their knowledge/skill
It's a curved score I guess :p
 
@Sotos I think she meant it but in the scope of the classroom, like she did well at her R exam...
 
11:03 AM
@Cath Do interns get paid there?
 
@Sotos yes but not much
 
We had an intern here during the summer and he told us he was getting paid 400 euros per month (for the 3 months he was here)
I don't know If it is much or little...
 
I actually don't know exactly how much they get paid here, I guess it's the same kind of amount, maybe a little more
 
@Sotos I'm currently doing my PhD and get around 95-100 Euros.
So, that's a lot. :D
 
@m0nhawk what!?
that's crazy
 
11:18 AM
@Axeman Things in Ukraine aren't going very well.
Average salary: $200.
 
the rent for a student room is at least twice that here
 
We have cheap rooms for students. But rent overall are very expensive (some 3-star hotel is $120 per day).
 
@m0nhawk o_O I think I'm gonna say that to our PhD students so they can believe they are very rich...
 
I'm doing some bad marketing for Ukraine now. :D
 
your salary would allow you to buy about 10 beers here o_O (in a bar)
 
11:25 AM
btw as for the new "member" coming in just to whine why his bad Q was DV, is it ok if I put him on read access only (I don't think he'll come back anyway but...) ?
 
11:37 AM
@m0nhawk Really??
I was getting about 3K p/m (pounds) whilst doing mine
Of course National Rugby team of Wales was sponsoring that so the funding was quite good for the uni
@Cath Fine with me
 
@Sotos ok, thanks :-)
and done
 
 
2 hours later…
1:31 PM
@Cath Katedatorship at it's finest
5
 
@DavidArenburg lol I just find that quite rude to come in a room just in order to whine (much I found even more annoying after seeing the Q he was complaining about...)
@m0nhawk you use optparse, right ? I may have questions later... ;-)
 
1:52 PM
^ I suggest we mute Kate. Coming here with her questions an 'all
 
@DavidArenburg a lot have tried, nobody ever succeeded...
 
I'd bet :)
 
;-)
 
 
1 hour later…
3:09 PM
Please re-open, ignore the million rows of ifelse codes, see the example input and output, question is clear: stackoverflow.com/q/47457855/680068
 
Vote cast
 
yeah me to, but quite the horror show there haha
 
That's crazy
Mainly: rowsum - headcount : split by packs of 10
 
@Tensibai yup go for it :)
To be fair it is a good question, and with good (bad) effort, with example input and output.
 
Just have to find something clever to split in blocks of 10
Just a tricky one...
I'ev a problem with the 2nd entry (round 30)
V1 V2 V3 V4
1 10 10 10 6
2 10 10 10 0
3 5 0 0 0
nailed it :)
 
3:43 PM
@Tensibai see comment about 35 being 45
 
Just saw it
problem being: -5%%10 gives 5
(no negative there :( )
  day1 day2 day3 day4
1   10   10   10    6
2   10   10   10    0
3   -5    0    0    0
Nailed again
 
:)
@Tensibai oh crap, question just evolved to a new level. Do you have the 3rd nail?
 
whoops getting tricky now
 
Need to go in a recursive math now
 
4:24 PM
French guys innovative solution for bad financial results linkedin.com/feed/update/urn:li:activity:6337460973036675073
 
@Cath Hi, yes, ask if you have some question. :)
 
@zx8754 Seems so ;)
sorry @user43850 we have some rules about write access you can find in the topic link davidarenburg.github.io/GMTs
 
4:50 PM
You can if there's decimal, that's the problem when you don't make a exemple matching the reality, the answers are not exactly matching what you're after ;) — Tensibai 10 secs ago
Chameleon question escape ongoing :)
 
@Tensibai That's not a "problem". It is guaranteed that x == x%%y + y * (x%/% y). As (-5)%/%10 == -1, obviously (-5)%%10 must be 5. Otherwise the equality would not be correct.
 
@JorisMeys I never said it was a bug, I said it was a problem to handle in this specific use case ;)
I wonder why -5%/%10 = -1 btw
> -10%/%10
[1] -1
> 10%/%10
[1] 1
> 5%/%10
[1] 0
> -5/10
[1] -0.5
> -5%/%10
[1] -1
That doesn't make much sense to me that the integer part of -0,5 is -1...
 
 
2 hours later…
7:19 PM
@m0nhawk cool thanks :-) for now I'm struggling to have unknown number of parameters (like t1, t2, t3, ... but I don't know how much "i" there will be). Is that possible or am I searching in vain ?
 
`optparse` is a bit hacky for this.
https://docs.python.org/3/library/optparse.html#callback-example-6-variable-arguments
 
@Tensibai euclidean division with decimal numbers doesn't make much sense anyway;-p
@m0nhawk well at least I didn't miss something obvious... (always seing a half full glass) ;-)
thanks for the link :-)
@m0nhawk actually it gave me another idea: I only need file names so I think I'm gonna make just one parameter with all file names separated by like semi-colons and that'll be it ;-)
 
8:09 PM
@Cath That will also work. :)
Then just option.split(',').
 
@Cath > @Tensibai euclidean division with decimal numbers doesn't make much sense anyway;-p

Actually it does, the ratio of two decimal numbers does not need to be a decimal number. :) (famous example is 2/3)
 
@m0nhawk ah cool, I did strsplit(..., ";")[[1]]...
@MichaelLeBarbierGrünewald 5%/%10 is just 0 as 5 is 0 times 10 + 5 as in euclidean division. euclidean division is only for integers. For negative numbers, you're just supposed to do the euclidean division of the opposite (so positive number) then negate it. So -5%/%10 is actually -(5%/%10) so -0 so 0
anyway, that's how I learnt it... ;-)
 
9:02 PM
Actually the algorithm for integers can also be applied to decimal numbers, by factoring out an adequate power of 1/10. It also works on polynomials and some cases derived from polynomials. And probably many others I am not aware of :)
 

« first day (946 days earlier)      last day (2361 days later) »