« first day (2024 days earlier)      last day (1151 days later) » 

1:50 PM
oh well, after all the work you did to help them, they deleted it
 
2:18 PM
Can someone look at my answer here -> http://stackoverflow.com/questions/37026669/r-fast-hash-search-in-list-environment
and tell me why keyed access to data.table is so slow ? (I'm probably doing something wrong, not a big expert of data.table...)
 
@digEmAll i think you're just hitting overhead of [.data.table because you are using it so many times. DT[ tail(fromTo, .1*nrow(fromTo)), time] is faster and seems to do the same thing. if the op really needs to do hash-like stuff (accessing one element at a time instead of vectorizing), maybe they should just use a hash from the hash library or some rcpp data structure
 
2:46 PM
OK, good to know, so my access is correct but it's probably the overhead... thanks
 
 
2 hours later…
4:23 PM
is there a canonical "don't use attach()" reference/SO question? (?attach does mention this, under the Good practice section ...) stackoverflow.com/questions/37032553/…
 
19
Q: Why is it not advisable to use attach() in R, and what should I use instead?

SavedByJESUSSince this is a place to learn, let me start by this (for those who don't know). Let's assume that we have a data frame in the object x which contains the columns job and income. Referring to the data in the frame normally requires the commands x$jobfor the data in the "job" column and x$income ...

maybe
however, accepted answer starts "I use attach() when..." though i guess standard/recommended practice is to never use attach
 
4:45 PM
@Frank "what, never? No, never ... well, hardly ever ..." youtube.com/watch?v=c548RjB8jzQ
 
heh, yes, i'd start with "never" even if i had to weaken it later. (had to google that quote; i'm not too up on gilbert and sullivan)
ah, thanks for the link :)
 
 
2 hours later…

« first day (2024 days earlier)      last day (1151 days later) »