« first day (705 days earlier)      last day (2597 days later) » 

 
3 hours later…
4:32 AM
@Sotos They've been around for a while though, right? (Hopping around the country for the last few days, so haven't been able to check back here to see what's going on....)
@AvinashRaj That was a brief visit :-\
 
 
2 hours later…
6:21 AM
Morning ppl
@A5C1D2H2I1M1N2O1R2T1 yup. One of the good ones
 
6:39 AM
Hello hello :-)
 
7:14 AM
Hi @Cath :)
 
Hello all
 
Hello
 
8:19 AM
Aloha.
 
8:42 AM
Hello
 
good morning @ all
 
9:06 AM
morning Europe
 
How can we use geom_text on geom_bar without "stat identity" ? See this post stackoverflow.com/questions/43039359/…
Using mtcars, add n on the plot:
ggplot(mtcars, aes(factor(cyl), fill = factor(gear))) + geom_bar()
All geom_bar label type of posts I found are about stat="identity".
 
maybe look for stat='bin'?
 
9:24 AM
@SymbolixAU Good autumn, non-Europe.
 
Cheers @RomanLuštrik - still feels like summer though :)
 
Ah, makes sense. It's calendar winter, but birds are already flocking back. Flowers are starting to bloom... full blown non-calendar spring is here.
 
9:55 AM
Anybody who can dupe this with correct target as mentioned in comments?
 
@RonakShah done
 
Thanks @Jaap
 
We can delete the post suggested by Natty.
 
@Natty tp
@Natty tp
@RomanLuštrik voted on both
 
10:45 AM
@RonakShah has made a friend for life.... Or is it a frenemy?
The concept of wrangling has become overrated....
 
@A5C1D2H2I1M1N2O1R2T1 haha..were you there? Or you get to see the deleted comments ;-)
 
Saw them before they got deleted. He's been on your case a lot recently....
 
yes..I am being patient and trying not to respond to him. Lets see how much I can take.
yesterday i got this
also, I don't think that is the right dupe.
 
11:24 AM
@RonakShah Well, I posted an answer that doesn't involve all, so hopefully he won't snip at me too. But I didn't know he owned the all function....
 
@A5C1D2H2I1M1N2O1R2T1 that was the same argument I was going to use against him yesterday and going by his logic he should also remove the ave solution from his answer because that was "owned by me" and he only had data.table solution :P
Anyways, how was Pune ?
 
@RonakShah Busy. The teacher's workshop went on until just before 6, then I headed straight for the airport to come back to Chennai. If I'm ever up there for longer, I'll let you know, but most of my trips have been in-and-out in one day.
 
11:44 AM
@A5C1D2H2I1M1N2O1R2T1 Sure :)
 
12:21 PM
Are you guys able to verify either the OPs solution or the accepted answer at this question (with the sample data they shared, as they shared it)?
 
12:34 PM
@A5C1D2H2I1M1N2O1R2T1 I get this:
Error in mutate_impl(.data, dots) :
  wrong result size (9), expected 16 or 1
 
@RomanLuštrik, that's what I get too. But they seemed happy enough to start a bounty.....
 
12:46 PM
Is it still the case that dplyr cannot accept grouped values that have more than 1 row? If so that's astonishing. I'm thinking of this issue @eddi brought up:
12
Q: grouped operations that result in length not equal to 1 or length of group in dplyr

eddiI'm not sure which function to use to do the following: library(data.table) dt = data.table(a = 1:4, b = 1:2) dt[, rep(a[1], 3), by = b] # b V1 #1: 1 1 #2: 1 1 #3: 1 1 #4: 2 2 #5: 2 2 #6: 2 2 Both summarise and mutate are unhappy with this length: library(dplyr) df = data.frame(a = 1...

 
@BrodieG AFAIK that is still not possible, that's also one of the reasons why I prefer data.table
 
@Jaap Wow, I find that astonishing.
 
@Queen k
 
@BrodieG me too
@BrodieG this ---^ among others make that I have a healthy dose of scepticism about Hadley's "God-factor"
 
1:04 PM
Reading resume of sysadmins calling themselves DevOps... Tempted to trash 2/3 just because of that
 
1:20 PM
@Tensibai But how do you know they are not totally 1337.
 
1:31 PM
@BrodieG Because they would word it as "SysAdmin fluent in a DevOps Organization" then :p
More or less, that irritate me as trying to take advantage of a buzzword
 
@Tensibai If they knew the tools behind those buzzwords - why not?
 
@m0nhawk Maybe just because I'm reluctant to hire someone using buzzwords ;)
That's for a position to work with me, so of course I'm biased
And probably because devops as a role is the buzzword, it's not a matter of tooling but of culture
 
morning all
bah and fie, plenty of votes for what should be a simple self join stackoverflow.com/q/43045098
 
@Tensibai Data Science also counts as a buzzword? :D
 
@m0nhawk No idea, talking about what I know for this specific case
 
2:16 PM
I only new some network configuration stuff and Docker.
Have setup the Docker Swarm Elasticsearch cluster lately.
Adding new servers is one-liner.
 
2:28 PM
Package is from 2013, and never seen it :( could have saved many hours of ggplotting about
 
Nice one.
Looks promising.
Even plots for models...
 
regexers, looking here stackoverflow.com/q/43049015 surprised i can't find a char class to match the bad chars, [^[:print:]] doesn't seem to work
(i didn't add the regex tag since maybe there's a better way to handle this)
 
@Frank [:alnum:] ?
 
@Tensibai the docs say alnum is a subset of print
 
Indeed, did forget it
 
2:34 PM
code i'm trying is gsub("[^[:print:]]+", "", Name) -- though this is not addressing the OP's actual question (which is to drop the bad strings wholesale)
 
grepl instead of gsub
 
right
 
See the actual answer, the other way around, matching any char outside standard ascii
Problem being, when there's 1 ascii char, you get a match
 
@Tensibai yeah, i guess i'm confused by the true value for grepl("[[:alnum:]]", "Ã")
 
This one will return false, but "Ãa" will be true
There's one a in the text, and that's ok for the match
 
2:37 PM
i'd expect alnum == A-Za-z == `ABCD...xyz"
 
Indeed it's [a-zA-Z0-9] IIRC
 
@Tensibai i don't follow. grepl("[[:alnum:]]", "Ã") is true, but grepl("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", "Ã") false
it must be that alnum exceeds the values it is explicitly supposed to contain?
 
You forgot the character class in the second option
 
!grepl("[^a-zA-Z ]", Name)
 
@Tensibai ah right, same with grepl("[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]", "Ã") though
 
2:40 PM
I wonder if unicodes 'A's are not coerced to match their ascii counterpart
Which makes sense in some way, they are variation of a A
 
@Tensibai if it were, shouldn't grepl("A", "Ã") be true?
 
maybe, or maybe just grepl("a", "Ã")
So let me see: [[:alnum:]] match "Ã" but [a-zA-Z0-9] dont ?
 
@Tensibai yeah, that's my confusion
docs say "Their interpretation depends on the locale" -- so i guess that's the catch-all excuse
 
Indeed makes it strange, maybe there's something about alnum/print using locales
 
"For example, [[:alnum:]] means [0-9A-Za-z], except the latter depends upon the locale and the character encoding, whereas the former is independent of locale and character set." -- do they perhaps have "latter" and "former" backwards here?
 
2:47 PM
Seems so
 
ok thanks. guess i don't want to bother r core with that, considering i don't know how to just submit the typo fix
hm, new answer doesn't work on my system, iconv(Name, from = "ASCII", to = "latin1") returning no NAs
 
3:02 PM
this edit seems to just be self-promotion, alongside a comment demanding his package be added to the accepted answer: stackoverflow.com/posts/13656699/revisions
anyway, reverting
 
@Frank BTW There is no tag info for installr which makes this tag pretty ambiguous.
 
@UweBlock yeah, i noticed that. there is an ios dev tool with the same name. if he wants to use the tag to advertise, he could at least go to the bother of writing a tag description...
 
 
1 hour later…
4:21 PM
wow, that package has evolved a lot; tried it a couple of years ago and decided that it's not worth the effort
I seriously have to reconsider that judgement ;-)
6 messages moved to Trash can
 
@Queen k
 
5:31 PM
@Frank You could post on R-devel. Sometimes that is sufficient if the function/doc authors are around.
 
@BrodieG ok, thanks. i don't really want to step into r-devel over this, i guess (since it's not really a problem for me and i kind of hate dealing with or thinking about regex). i'll bring it up in the R room, though
 
@Frank Fair enough.
 
6:02 PM
@Frank That comment is annoying
 
yeah, obnoxious, i think. like "hey, everyone else is advertising for me. you, as the accepted answerer, must therefore do my bidding"
 
It is surely flag-gable
 
i hate appeal-to-polling logic, which is to say, 90% of what trump and his staff have said since his election
@DavidArenburg yeah, i don't flag, and can imagine a mod thinking that's on-point somehow. could lobby Bhargav, though
 
I say 90% chance this flag will deem helpful
but Im going for dinner now so'll flag it later
 
6:17 PM
cya David
 
6:49 PM
ok, flagged
 
7:12 PM
flagged too
 
7:49 PM
DT pros not gonna like my comment there
 
@zx8754 Your comment looks fine to me
(not a DT pro though)
 
Thought <- was a bad idea with DTs, and my comment is stolen :/
@DavidArenburg joke of the year
 
How bad can be replacing a single value?
 
¯_(ツ)_/¯
 
I also remember this specific code to be very efficient (let me look for it a sec) though I don't really know why it works
looks like even Arun doesn't know for sure
@DavidArenburg, check data.table:::`[<-.data.table`. I've never used it as well. I don't think anyone uses it. It must be still there for backward compatibility, not sure. Any and all improvements did not also occur in that function (since it's not idiomatic) would be my guess. — Arun Aug 13 '15 at 19:17
 
8:02 PM
FWIW:
> microbenchmark(set(DT, 1L, 1L, 99), DT[1, a:=99], DT[1, "a"] <- 99)
Unit: microseconds
                expr     min       lq      mean   median      uq     max neval
 set(DT, 1L, 1L, 99)   1.680   2.3320   3.64421   4.0110   4.510  14.959   100
  DT[1, `:=`(a, 99)] 304.960 324.7010 339.75691 333.3825 349.476 570.734   100
    DT[1, "a"] <- 99 373.667 407.4845 419.01675 417.3195 429.586 473.812   100
[.data.table has lots of overhead.
 
yeah, this function is a mess. But it seems like no big advantage of := over <-
@BrodieG Though don't forget these are microseconds
 
8:37 PM
@DavidArenburg could be that it would be more painful if RAM was tight (since the dig against [<-.data.frame is MEMCPY or some other C-level thing about unnecessary copies ... no idea if [<-.data.table inherited that problem)
 
@Frank looks like data.table:::`[<-.data.table` calls Cassign in certain cases too
 
has if ... else ... with Cassign in both, so i guess it always calls it
 
Not always it seems, I also see x = `[<-.data.frame`(x, i, value = value) there in atleast two cases
 
ah ok, forgot to consider early return()s
 
and there this thingi there too data.table:::cedta
which looks like a real mess
I always wonder why all data.table (R) source code is full with sapplys instead of vapplys
 
8:50 PM
i hadn't noticed, also don't see the sapply here
 
yeah cause that code is unredable there, but there is sapply(sys.calls(), "[[", 1L) == "eval") hiding there
 
cleaning up the code looks like a massive undertaking, but at least its on the roadmap github.com/Rdatatable/data.table/issues/852
once it's modular, it'll be easier for contributors to hone in on parts that can be fixed without worrying about everything in [.data.table collapsing or summat
quoting you: "In your case you executed it 100K times (unnecessarily, I might add). If you are using data.table and you are making calls to it thousands of times, you are probably using it wrong." ;)
http://stackoverflow.com/a/21033402/
 
One of my LinkedIn connections is a "Data Guru" ffs
 
9:05 PM
heh
 
9:34 PM
@Frank Hah, nice find.
I almost wrote back to @DavidArenburg and the microseconds comment something along the lines of "well, if you repeat it a million times now you're talking real seconds", but who would do that right...
 
9:50 PM
heh :)
 

« first day (705 days earlier)      last day (2597 days later) »