« first day (491 days earlier)      last day (2813 days later) » 

 
1 hour later…
 
2 hours later…
6:25 AM
@DavidArenburg too short... ;-p
@StevenBeaupré thanks :-) Hi Steven :-) How are you ?
 
7:28 AM
Hello
 
Halo
 
What do I do if I find a bug in a package?
 
Open an issue on the package repo ?
 
or email the maintainer
 
No idea how to do that :)
Oh the email part I know
 
7:37 AM
Which package? if they are on GitHub just open an issue.
 
what package?
 
urltools
 
ie. urltools::suffix_extract('bankofcyprus.com')
Thx @zx8754
 
host subdomain domain suffix
1 bankofcyprus.com <NA> bankofcyp us.com
There is already an issue opened on this: github.com/Ironholds/urltools/issues/48
 
7:43 AM
Ahh...ok. Nevertheless I m going to have to rewrite a lot of functions...pffffff
 
Akrun's getting hammered today.
None of those are my votes either.
haha
People seem to be growing tired of his crap.
 
8:20 AM
Lotta flags going up right now.
 
@Sotos Found it :p
This one was particularly funky to find :p
 
@zx8754 I don't like the fact that if I custom flag a comment and then the user deletes it, the flag is marked "helpful". The problem is that a mod will never see it.
I just raised 5 custom flags on his comments.
 
I think he should be banned for couple of months to cool down.
2
 
Round it up to a year to be safe.
 
I would convert all answers to dupes to wikis by default.
 
8:32 AM
@Tensibai yup...still havent read it. Very swamped at work...
 
@Sotos At root: a floating point problem
@DirtySockSniffer Then custom flag one post, explain the why and give links to others posts in this one, so the mod will have all informations at one place to check out and act accordingly ;)
 
Exactly what I first thought...all those decimals did the nasty
 
 
2 hours later…
 
1 hour later…
11:44 AM
 
 
2 hours later…
 
1 hour later…
4:11 PM
Wow. Look at this, and then look at this. And finally, look at this. This guy is not so great.
That's dirty
 
last and first link are the same?
 
The first link is the question link. The last link is a comment link
 
ah yes
 
He completely destroyed that person's question by linking it on meta then said "sorry you got downvotes. I upvoted it."
Sorry not sorry
 
they should just revert meta votes like they do serial down votes
 
4:24 PM
It's probably hard to track.
 
4:40 PM
can't he just comment instead of whining on meta
3
 
morning, all!
 
 
1 hour later…
@mtoto yeah, "How to address (if at all) OPs who try to sneak-edit?" hey, how about you address the OP rather than us, the mob of meta, for starters?
hello all (if there's anyone here)
 
hi Frank
 
hi Frank
 
hi Frank
 
hi Frank
 
6:09 PM
hi Frank
 
oh, a lot of folks indeed
thinking of rejecting the three open Docs proposals, not because they're bad, but just because in their current form they need some work... thoughts? stackoverflow.com/documentation/r
 
gold
@Hack-R the question got so many downvotes because you linked it in your meta post. I am sure your upvote is well appreciated though. — mtoto 1 hour ago
The funnies thing though, that the OP of this question still got a positive score on it (15*5)-(37*2) + 2 = 3
 
Haha wow.
 
and another 5 from me now
 
@DavidArenburg Good one haha
 
6:17 PM
I feel like commenting "This post is being discussed in a chat room."
He got 3 dv today
 
Like they say, "it's all about the net gain - nurka"
2
 
Was that algebra i just saw?
 
@jogo srsly? stackoverflow.com/documentation/proposed/changes/88706 (looks like jogo's been out too long to be pinged). guess i need to add another section on style like "no, really, <- and = are both okay"
 
@Frank I don't like the = neither TBH. Made a similar edit on Documentation not long ago myself
for me it's like T instead of TRUE
 
6:23 PM
i use = more and more, don't see an upside for the arrow, unlike T vs TRUE. i almost always have a var named T these days (for size of a time interval), and often F too (a cdf)
 
T vs TRUE is hazardous, = or <- is just style preference.
 
i guess the has some advantage in readability, like "this part is assigning; and this part is naming return values in a list"
 
@StevenBeaupré not really
they are different. There is a famous question on SO about it
 
@DavidArenburg link? not sure what you mean
 
It's in somewhere
 
6:26 PM
most common misuse i see is c(x <- 5) expecting c(x = 5)
 
@Frank this is one difference. Also assigning values within function calls
 
Yeah I found it
 
@Frank - For that you need c(x = x <- 5) ;)
 
@DavidArenburg I strictly had assignment in mind
 
if(length(test <- 3)) 1
vs
if(length(test = 3)) 1
f <- function(x = 2) 1
vs
f <- function(x <- 2) 1
I could think of many other use cases
 
6:29 PM
i must be missing something here. you're saying that it's an important usage to assign to vars inside function calls?
 
@Frank I'm saying they are not the same
and you see that they behave differently in different situations
sometimes = works and <- doesn't, sometimes the other way around
 
@DavidArenburg ok, but we all knew that already. i'm still not seeing why you would care to edit = as assignment to <-...?
 
@Frank you knew that
I would guess that 95% of R users have no idea about it
 
i think those 95% of r users are not qualified to use if(length(test <- 3)) 1 or f <- function(x <- 2) 1 and can be protected from themselves by only using =, no?
to the extent that i have an opinion on one vs the other, that's what i see
anyway, the note's over here: stackoverflow.com/documentation/r/5410/… i think we should keep it to only stuff that we're unanimous about, which turns out to be almost nothing. markdown headers, i guess
 
I think those 95% of R users should use <- according to docs and = according to docs
rather bringing other languages idioms to R
if I do ?c or ?data.frame, I don't see = assignment anywhere, rather <- everywhere
 
6:36 PM
eh, ok then. how does that land you at editing <- to = where both will do?
 
because this is the idiomatic/documented assigment in R
 
@DavidArenburg um, of course `?=` also documents its use as such
 
That's a goo point I guess
but I don't see it being used in such way anywhere else in the docs
 
anyway, i mean the note to serve as both a guide to editors and a heads up to reviewers that "no, don't clog up review with your trivial style prefs". i'm not convinced that the assignment ops thing rises above subjective style prefs, but since your edits don't have to go through review and i'm not about to edit-war you on it, go ahead
 
6:39 PM
in both ?c and ?data.frame there are examples of how both <- and = should be used
@Frank I gave up on SO docs long ago
dont have neither time nor interest
And I disagree it's just a style preference, but whatever
 
@DavidArenburg that doesn't bother me... anyway, i'll be teaching my colleagues with a doc mostly/all having =, since i don't see much benefit to the mental overhead and extra cost of translating code
 
This solution is so elegant it should wear a top hat and ride in a Rolls Royce. — Minnow 23 hours ago
Hahaha
 
looks like i use <- one time in the first/main chapter (the rest aren't done yet): raw.githubusercontent.com/franknarf1/r-tutorial/master/_book/…
 
@StevenBeaupré - That's a good one. But yikes. That apply() answer is no good at all.
 
I wondered if it was some sort of expression I never heard of. Seems like it might be
Just noticed this is yet another question where nurka post an answer and then mark as duplicate ;P
 
6:49 PM
I'm really surprised France is not allowing burkini. I find it both not democratic/against basic human rights and ridiculous. Very awkward
3
 
This pretty much sums it up
guess Cath will have to ditch her burkini
 
France is experiencing a shift towards xenophobia / far right.
 
I think it always been forbidden
It's like part of it being a secular country
 
Waiting for nurka to comment here something like "I had thought of this first but didn't post it, and since it has so many upvotes it is a biased voting ring."
He hasn't harassed Josh O'Brien yet.
 
6:58 PM
he won't neither
 
You want "either" there, not "neither"
 
What's the difference b/w @DirtySock and @DirtySockSniffer? I see both as distinct names linking to the same user
 
@r2evans it's just the chat messing around with you
 
When it says "Sniffer", I am breathing in.
 
One is only smelly as the other is downright creepy
 
7:01 PM
Thought one was closely-stalking the other ... ;-)
I see, it's a single-line compression versus multi-line thing
 
@StevenBeaupré while also being smelly :)
 
your screen is probably small or with low resolution
 
@Frank Touché ;P
 
Just because I am dirty doesn't mean I'm smelly. You guys are mean.
 
we normally don't talk about other people's things as small ... ;-)
 
7:02 PM
hmm, I explicitly said screen
 
@DirtySockSniffer hey, we just understand that that's what happens when you are around dirty socks a lot
 
or this is some synonym for other things?
0_o
 
That was flag material. Haha
@DavidArenburg "either" means one or the other, while "neither" means none of them.
Is that what you were asking?
 
think he was talking about "screen"
 
hmm.. can't recall asking anything
 
7:06 PM
Oh, well then now you know about either/neither
 
ok, thanks
 
close as code dump, imo stackoverflow.com/q/39152914
 
7:22 PM
@Frank on of those merge questions that don't have exact dupe but were answered so many times in different variations
I was thinking if just dupe it with the merge dupe and move on
I mean the question you've just answered, not the regression one above
 
@DavidArenburg yes, i guess it's been asked before, but i don't think the left/right/whatever target is good for this sort of thing
been asked, and been answered by me, too, i'm sure
DT[i, on, `:=`(cols)] might be my favorite thing about data.table syntax
i've got three instances of my answering that way, but they all required some sort of reshaping first, looks like. since i don't have an extensive vocab for this sort of thing, was calling it "merge assign" stackoverflow.com/search?q=user%3A1191259+%22merge-assign%22
 
I think this is an interesting question of how cbind behaves internally stackoverflow.com/questions/39153221/…
not sure what's the downvotes for
 
Kind of surprised cbind(dat, 'x10' = 1:10) works actually
 
@Frank now that I think of it, I guess there is a reason why all the replacement functions are of form `levels<-` rather `levels=` for instance
 
7:39 PM
@DavidArenburg for clarity?
my intro doc says, late into it, "oh yeah, and levels<- is a thing, but don't use it because, obvs, it's mondo confusing"
but pointed to the docs so one could read about them and learn when they're useful and what sort of functions have a <- form
 
My custom flags from last night were helpful. So helpful, in fact, that nothing happened.
When you start your answer by stating "this is not really an answer" ...
 
8:01 PM
just found a good usage for if(indx <- ...
or maybe not
 
@DavidArenburg - Were you thinking of
d[d[, .I[if(any(x == 1)) x == 1 else 1L][1L], by = a]$V1]
#    a x y
# 1: 1 1 2
# 2: 2 0 1
# 3: 3 1 1
?
 
@DirtySockSniffer more like d[, if(is.na(indx <- match(1L, x))) .SD[1L] else .SD[indx], by = a]
 
Not even sure I got that right
 
@eddi nice option, I forgot that which.max returns 1 in case of no match for a logical vector
though I've got burned by that behavior not long ago
now we wait for nurka to post the exact same solutions in dplyr
 
8:17 PM
You mean hadleyverse and base R
 
8:36 PM
@DavidArenburg there are a bajillion ways to do this, i guess, especially following the preface "assuming the data is all binary..." like unique(d[order(-x)], by="a")
or equivalently (-ish?) d[order(-x), .SD[1L], by=a]
 
@Frank I don't think it's correct
 
oh, right, because they want the first row when no match is found, yeah
 
the order should be remained. That was my initial thought too as I always pick first instances using unique in real life
until once Arun told me it's no better than just .SD[1L], by = gorup :(
 
maybe d[order(-x, 1:.N), .SD[1L], by=a] preserves order, dunno. i find it hard / unnecessarily hard to wrap my head around cases where people say row order matters but can't be bothered to have a variable capturing that dependence
@DavidArenburg yeah, i remember that
 
though the thing I like about nomatch is the flexibility to select any value
i may start using it some times in real life
 
8:40 PM
yeah, i like that. had no idea the arg was there
 
@DavidArenburg yeah, no idea why it does that though - seems unintuitive/wrong to me
 
@eddi since .SD[stuff] is not optimized and i see it warning against inefficiency when i have verbose=TRUE, maybe y'all should link to your .I+$V1 answer
re which.max, it's returning the first element to attain the max and is not a generic function with special treatment for logicals, i guess
 
ah right, ok, that makes sense then; re .I - too lazy - tired of writing the same thing over and over again - they can just google if they hit a speed issue :)
 
fair enough :)
d[, if ((s <- .SD[x == 1])[, .N]) s[1L] else .SD[1L], by=a]
there we go, an excuse to use <-, although actually, i guess = works there too. oh well
looks like .SD does not yet use indices, so no benefit from x==1 there, anyway...
 
8:59 PM
Oh there is definitely biased voting on that post.
 
@DirtySockSniffer ? a just bias towards the rare new OP who writes a good question, i think
 
I was joking ;) The votes are totally even
 
yeah, i figured :)
 
9:24 PM
anyone have a dupe for "access like-named things from a list"? stackoverflow.com/q/39154880
 
 
2 hours later…

« first day (491 days earlier)      last day (2813 days later) »