« first day (498 days earlier)      last day (2815 days later) » 

 
3 hours later…
6:26 AM
Morning people
 
Morning Sotos....You get a companion regarding coloring problem
 
I actually noticed this to quite a few users. There is a meta about it...
Yours is brown and green :)
 
6:54 AM
Hello
 
morning @ all
 
evening
 
@Frank You can use a script from terminal.
 
@SymbolixAU yeah, 10 hr time difference ;-)
 
Hello @zx8754, @ProcrastinatusMaximus
 
RE: this one, can't we send that to the data science SE?
 
@Axeman more like biostars.org to me
 
that SE in unfortunately not in the close reasons, but you could use the "other" option and specify the link to DS
 
8:11 AM
Hello
 
morning
 
8:27 AM
For once, a new user baking a clean question:
1
Q: Using lists in foreach R

dgdiI am trying to parallelize the extraction of data saved in some html documents and to store it into data.frames (some millions of documents, hence the usefulness of the parallelization). In a first step, on the machine where I do register the queue, I select a subset of the html files and lapply...

Meta effect allowed here :)
 
@Tensibai meta effect awarded, but still too much text and code for my taste :)
 
@zx8754 I agree the Q is large, but for once it's a complex one clearly explained I'm up for it :)
 
8:45 AM
morning peeps
 
not an exact dupe, but I think worth closing "as too simple, see this post for a start..." - stackoverflow.com/questions/39266853
 
9:05 AM
@zx8754 I agree
 
@Sotos meanwhile bad answers are piling up :)
 
@zx8754 as exected
Expected...
 
9:20 AM
@zx8754 hammered
 
@ProcrastinatusMaximus cheers
 
That guy sounds confused... stackoverflow.com/questions/39267255/…
 
 
2 hours later…
11:08 AM
I was trying to solve http://stackoverflow.com/questions/39269449/extracting-and-merging-numbers-from-strings-in-r like :
gsub(pattern = "[[:punct:]]|[[:space:]]",replacement = "",x = numbers) which gave correct result as
[1] "97226424979" "815264627" "4902022801986" "0781482789" "06643420034"
[6] "060418728"
whereas str_replace_all(string = numbers,pattern = "[[:punct:]]|[[:space:]]",replacement = "") gave
[1] "97226424979" "81|5264627" "4902022801986" "0781482789" "06643420034"
 
@user2100721 you will also have more problems when you convert to numeric
 
@ProcrastinatusMaximus k :D
lazy people, dupe is the first hit on Google...
 
@Sotos No, actually my question is why "|" is still there for 'str_replace_all'
 
11:48 AM
@user2100721 maybe because it's a metacharacter and not considered punctuation.
No idea though why it does that with str_replace only
 
close as "I have data, don't know what I do" stackoverflow.com/questions/39270561
 
@Roland right, yeah, i was thinking (probably mistakenly) of folks doing things like Rscript -e 1+1 when terminal was mentioned
hi all
 
12:04 PM
Hey
 
Joke going around: Doctors apparently afraid to tell Karimov he's dead...
 
heh
 
12:23 PM
@Pro i'm thinking your shift(b) > 0 condition is probably too stringent, would have b = c(-2,2,2,-2) have posflag = c(0,0,1,0) when it should instead be posflag = c(0,1,1,0)..?
since the whole trio of rows seems to have a condition on it, maybe just shift 0:2?
w = DT[, shift(sign(b), 0:2, fill=0L)][V1 == -1L & pmin(V2, V3) > 0L, which=TRUE]
DT[, posi := 0L][c(w-1L, w-2L), posi := 1L]
anyway, a DV from me to the vague question
 
@Frank i've update the answer with a new dataset to take several other possibilities into account too
 
ok, the new answer is kind of complicated to follow
shift(b, fill = 0) > 0 & shift(b, n = 2L, fill = 0) > 0) could be one shift call with pmin, i guess
and for the second pair of shifts, it should be enough to take pmax of lead 1:2, i think
 
12:42 PM
true, thx for the suggestion; added a mix of pmin and .I now (with attribution off course ;-) )
 
ok, looks good to me
 
1:01 PM
thx for correcting the typo :-)
 
1:48 PM
@DavidArenburg what happened there?
 
@DavidArenburg you flagged that answer you comment on 1 min ago?, I think it is flagable for mod.
 
@Sotos they answering/accepting each others questions
 
@PetterFriberg I'm not sure if it is coincidence or not
nice pic btw
I flagged this answer though, without much success
3
A: Rename column SQL Server 2008

Chirag ThakarEasiest way to rename the column is EXEC sp_RENAME 'table_name.old_Column_name', 'new_Column_name', 'COLUMN'

The guy posted an identical answer to the accepted one (+ another identical answer) two years later and got 3 upvotes- how SO typical
 
@DavidArenburg meeh maybe a custom mod flag to check if same ip etc... but ok thanks
 
1:53 PM
@DavidArenburg wow...they just took nurka level a step further
 
@Sotos nurka would never post an identical answer on the same thread
that is indeed some next level s*** right there
 
Exactly!
 
2:18 PM
close as misusing math terms stackoverflow.com/q/39273025 (set, maximize, intersection)
pretty incomprehensible unless you can read their mind, i reckon
 
2:29 PM
I think I get it, but already spend too much time on SO for today
 
3:34 PM
 
3:44 PM
@Frank It's way too basic for them.
 
ok
 
4:07 PM
close as code dump, imo stackoverflow.com/q/39275923/1191259
 
4:39 PM
close as something or other stackoverflow.com/q/39276359/1191259
 
 
2 hours later…
6:35 PM
I'm a little confused myself, the R community here generally downvotes in a pretty targeted manner. — TARehman 44 mins ago
 
is there any sense in which this data structure might correspond to a tree? stackoverflow.com/q/39278257
@DirtySockSniffer i'm not confused by it. seems like a pretty not-useful question
 
I was a bit confused by it. Why is there no 1 in the third position of the answer? And I thought he was looking for positions?
 
like they have a column named "true" alongside a bunch of bools, make weird tests like ==!TRUE, ...
 
The first non-true for each row would be 2 2 1 1 1 1, wouldn't it?
 
" the first non-True (minus 1)"
 
6:42 PM
Oh, so the minus 1 means he wants to actually subtract 1? Real clear
 
indeed
 
I will subtract 1, from his score that is.
 
heh
 
Thought the "(minus 1)" was him being confused about what a "non-true" is
sometimes non-true is -1
I think in C it is, not sure though
 
ok, anyway sounds like they're out of their depth / hitting an AB problem if this is their approach "to find the longest common starting substring"
like, partial matching is a thing and all...
 
6:48 PM
Lol. Wrong site buddy. You want Tinder.
He's here to find the correlation between triceps and reputation.
 
heh
hard to believe that godaddy tag burning thing is still ongoing. they must've invested like a thousand hours in it by now
 
7:13 PM
Evening!
 
hiya, Heroka! been a while
 
I know. How are things?
 
not bad. you?
 
Same. Not a lot of time for R-tinkering though, unfortunately.
 
i've had some more of that lately, using it instead of stata for most of my work now (since stata won't cut it for these things), hopefully going to convert the rest of my team sooner or later
 
7:18 PM
good luck!
 
thanks :)
started a tutorial doc, but it has a ways to go
 
3
Q: Why use as.factor() instead of just factor()

BenPossibly a dumb question, but I recently saw Matt Dowle write some code with as.factor(), specifically for (col in names_factors) set(dt, j=col, value=as.factor(dt[[col]])) in a comment to this answer. I used this snippet, but I needed to explicitly set the factor levels, so I had to change as.f...

 
that's a ton of upvotes...
 
"as.factor is faster." - Oh, well then +70!
2
I wish I got upvotes for ideas I have at work. I'd be the boss already.
 
yeah, kind of neglects the whole consequences of the quick return business, like ... f = factor("a", levels=c("a","b")); factor(f); as.factor(f)
 
7:23 PM
That's good under-answer comment material there @Frank
 
ok
btw, of course it's not gonna improve efficiency, but i guess some might take your comment seriously
which, you know, is fine, just an observation
 
ok fine. Haha
I like witty one-liners, if you haven't noticed.
 
i have indeed
pleasantly surprised that folks didn't pile downvotes on the q for being "too easy" or not having an example or some such nonsense
 
8:12 PM
The accepted answer here is awesome
Actually this one is the money shot
 
never thought about how to make an & in a regex, but yeah, that looks handy
 

« first day (498 days earlier)      last day (2815 days later) »