« first day (2193 days earlier)      last day (982 days later) » 

7:40 AM
Looks like the culprit was a missing `\`.
 
 
1 hour later…
8:52 AM
@RomanLuštrik close as typo
 
Too bad the error is so uninformative...
 
9:14 AM
@RomanLuštrik still don't believe him. I can't duplicate "DESCRIPTION file not found" with what he said the problem was. So shrug
 
 
9 hours later…
5:46 PM
Sorry guys, maybe silly question here, but is it possible to perform an efficient subset of a sorted numeric array given a range of 2 values ? (oversimplified example : v<-1:1000;v[v>=300 & v<= 500]) I couldn't find any way exploiting binary search, not even data.table seems to be able to do so...
 
You must be pretty close to some sort of event horizon if v[v>=300 & v<= 500] is too slow. (Not criticizing, just sayin', you must be pretty far down some optimization rabbit hole...)
I guess if the vector is long and the range is small...
 
To be honest, I'm actually doing a bit of premature optimisation here... but I'm going to implement an algorithm which is impossible to vectorize so I'll probably be forced to do this kind of search a lot of times in a loop in a big vector...
of course I will test also the linear approach, but I was just looking if something using binary search is already implemented
 
6:05 PM
I don't know data.table well enough to know if it could do that or not. I suppose a sort of lame default response might be to just implement it using Rcpp from the get go.
 
6:23 PM
Yeah, probably I'll resort to some function implemented in Rcpp...
 
6:53 PM
May I ask for a mercy-kill delete vote here: stackoverflow.com/questions/40143843/…
 
tried to engage, wasting my time, pizza time
 
@Spacedman You are feeding the troll. Very bad idea. You is now also here with an identical question. Which one do we hammer-close ?
 
@DirkEddelbuettel I already was the 5th close vote on the first, maybe just delete the first one?
I guess we can't unless it has a negative score...
 
The whole premise of the question is weird. I know nothing about rPython, but just scanning it wouldn't it seem like the answer is to run python.exec("import numpy as np") inside the function itself first? I don't get it.
 
I dunno. They have the answer, they just don't like it.
 
I've got as far as getting my pizza baking tray out, i've not even lit the oven. please send me back to the kitchen.
 
Once again shows that volume and noise are inversely correlated with cluefulness.
 
actually I wonder if you cold build a roxygen roclet that looks for @python numpy and then collected those into a .First...
 
For that person you'd just hope BDR would be around to smack'em.
 
8:04 PM
I don't think the question is ridiculous (if framed as a "hypothetically if I had a stylistic preference for XXX") - just the tone. I edited and upvoted.
 
You could try data.table::between, it seem to be pretty fast for a big vector (I think it was rewritten in C only in v>=1.9.7 though)
v <- 1:1e7
microbenchmark::microbenchmark(v[data.table::between(v, 300, 500)],  v[v>=300 & v<= 500])
# Unit: milliseconds
#                                expr       min        lq     mean    median        uq      max neval cld
# v[data.table::between(v, 300, 500)]  36.12356  37.57007  45.7164  38.12318  39.43353 151.5820   100  a
#              v[v >= 300 & v <= 500] 317.66496 320.55415 349.0931 325.42214 373.79504 468.7411   100   b
 
8:20 PM
@DirkEddelbuettel oops with my .First - I was thinking of .First.Lib and R circa 2004 or something. .onLoad/.onAttach indeed
 
8:45 PM
@Spacedman The gift keeps on giving. Now he is lecturing you: stackoverflow.com/questions/40162335/…
That's the troll you fed so you own him now.
 
9:22 PM
@DavidArenburg : interesting... unfortunately this code will go on a customer server soon, so I don't know if 1.9.7 will be ready then (and I prefer not to deploy a data.table still in dev version)
 
Can someone please give this user some cheese to go with their whine? stackoverflow.com/questions/40059573/…
 
9:37 PM
@JoshuaUlrich I wouldn't mess with him, his areas of expertise include Leadership, ROI, and Growth Hacking.
 
@joran Maybe I should offer him my care cup to fill with whine.
 
@JoshuaUlrich I dunno. They might put some in and then complain that the glass is half empty.
 
9:55 PM
@joran I got this gem from said user
How does foo know what's i and what's z since you only give it 1 object? — Hack-R Oct 14 at 3:06
Either said user is useless at R, or they can't read code, or they just want to be obnoxious.
Or all three, which is what I concluded...
 
10:24 PM
@joran its not a string, its a Duration class object that prints like a string. its still wrong because of the epoch is wrong, and its still fail because lubridate < base
 
10:54 PM
@Spacedman I said that. My bad. I'd edit my comment if I could.
I did get a downvote for my trouble. So much for trying to point him in the right direction.
 
11:16 PM
@GavinSimpson is my hero!
/me swoons
 

« first day (2193 days earlier)      last day (982 days later) »