« first day (829 days earlier)      last day (2346 days later) » 

12:25 AM
@thelatemail Starting a line? It sounds like putting /* in columns of data. Unless SAS is unlike any language I've ever seen.
 
@sebastian-c - I'm not sure, it's from here: support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/… I assume they are talking about the code itself, but either way it's very odd.
 
@thelatemail When it says Column 1, does it mean the first character of each line of code? In either case it definitely refers to data columns as columns: support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/…
 
According to another pdf (pg3) nesug.org/proceedings/nesug05/pos/pos10.pdf : Caution: "If you're operating in a batch environment on a mainframe, the machine may attempt to treat the ‘/*’ that starts in column one as JCL, while ‘*’ in column one is just fine." Sounds like it is talking about code not data, though I imagine this isn't a common use case.
 
 
4 hours later…
4:13 AM
@Andrie But I prefer science, not magic....
 
4:59 AM
Coursera professor recommends Stack Overflow & Cross Validated for getting help. Refers to them as "mailing lists" and "forums." :(
 
5:14 AM
@Andrie Ok. You win. Since there were wrong answers getting upvoted, I decided to post an answer of my own.
0
A: Reframing magic on data.frame

Ananda MahtoThe answers so far work to a certain degree, but don't fully answer your question. In particular, they don't address the issue of a case in which there are no shops which sold a particular product. From your example input and desired output, there were no shops which sold "Product3". Indeed, "Pro...

 
@sebastian-c - I vote to close that one about column accessing, it's clearly not a generalisable issue stackoverflow.com/questions/14515445/…
 
@thelatemail You're right. Close as too localised. I'd do the same, but I need another 500 rep.
 
@AnandaMahto - would you like to throw your weight around and cast a close vote? ;-)
 
@thelatemail You saying I'm heavy? ;)
Done. Too localized.
Thanks for the edit @sebastian-c. Copying and pasting from the original question...
 
5:31 AM
@AnandaMahto - umm....umm... an intellectual heavyweight. There, saved it. :-P
I am very accurately depicted in my avatar btw.
 
@thelatemail What, as a Kingdom of Loathing player?
 
@sebastian-c - never seen that before, but if I turn sideways you might lose me.
 
5:48 AM
@thelatemail If I remember correctly, to be allowed to use the chat room there, you had to first pass a test administered by the Ghost of the English Language. It had a passage and you had to choose the correct forms of "they're/their", "you're/your" and so on.
 
@sebastian-c - sounds like my kind of scene.
 
6:08 AM
@sebastian-c, @thelatemail, either of you want to read my response here and tell me if I'm crazy?
0
A: How do I find the minimum row number for each factor in R?

Ananda MahtoI feel like maybe I'm missing something here, because I have read this question in a totally different way. First, I see it as we're starting with two data.frames: "A", and "SummaryA". SummaryA$AveD1 represents the value from A$Dist1 that we are interested in. In particular, we are interested in...

It's hard to tell with the small amount of data provided as an example, but it seems like everyone who answered ignored the second data.frame entirely.
 
6:20 AM
@AnandaMahto It seems OP has accepted an answer which ignores SummaryA.
 
@sebastian-c I saw that, but it still didn't make sense.
 
@AnandaMahto Honestly, I found the whole matter a little perplexing too. I think your solution may only work while the averages are integers. I think the == may be ruined by floating point error.
 
6:53 AM
@AriB.Friedman, when did that happen?
And congrats on your gold badge!
 
7:54 AM
I bet Ari's putting that on the wall! :)
 
 
3 hours later…
10:29 AM
@AnandaMahto Thanks! I'm not sure when it happened. Probably yesterday, since I got a bunch of upvotes on oldie-but-goodie questions trickling in randomly throughout the past day or two.
funny the gold badge should come at the same time as the question ranking, since my answer score barely keeps me in the top asker list
I'd feel embarrassed about the disparity, but I'll fall back on Rabi's mother's quote
 
 
4 hours later…
2:23 PM
Played hockey from 10:30-12:30 last night. In bed at 1:45, up at 6:15... bright-eyed and busy-tailed!
 
@JoshuaUlrich So bright eyed you forgot the h in bushy? You sure it wasn't ockey?
 
@Andrie No, busy tailed. My tail is wagging all over the place. Wheeeeeeeeee!
 
I brought my dogs to the office today. Their tails are wagging all over the place too.
 
2:38 PM
I didn't know you have dogs. Got any pics? :)
 
Your dogs don't have necks? Weird.
 
Marking. I hate marking!
The main downside of being an academic is marking
 
3:31 PM
Today's entry in the "why me, effort?" department:
-1
Q: run Opencpu on RedHat or Suse Linux

user1783870OpenCPU worked great on Ubuntu. But because of internal IT policy reasons, i would like to try OpenCPU on approved RedHat or Suse Linux platforms. How do I go about it? Any pointers is appreciated.

 
4:05 PM
Set your clocks, we got a fresh one! New Q remotely involving date and time: stackoverflow.com/questions/14525484/…
I give it 80 minutes til we see lubridate mentioned. Over/under?
 
@DirkEddelbuettel I'll take the under.
 
People reading this are not allowed to participate in answering, right?
 
@RomanLuštrik If that's the case, then I need to change my bet.
 
4:20 PM
Is it actually possible to pass arguments to an R script when using source() from within another R script (as opposed to running it from the command line and using commandArgs) @DirkEddelbuettel ?
 
sure, stick em into cmdArgs() before you source() :)
 
@DirkEddelbuettel I thought about sticking library(lubridate) at the top of my answer just for fun
 
Is someone trying to flatter @DirkEddelbuettel into an answer?
Dirk, I already searched but could not any related one in StackOverflow. I saw you answered many R related questions. Thanks your contributions. — Leo5188 16 mins ago
 
@DirkEddelbuettel Ok. I'm going to interpret that to mean that I'm right that there's no way to pass arguments to a script at the moment I call source() from within another R script...
 
If you're calling source, you don't need command line arguments
> tmpfile <- tempfile()
> cat("print(a)", file=tmpfile)
> a <- 5
> source(tmpfile)
[1] 5
 
4:36 PM
@GSee Right, right. That's what I get for trying too hard to figure out exactly what the OP is trying to do.
 
@joran Hey, I don't know either. That's why I answered in chat instead of SO main ;)
 
4:48 PM
Can I get help on warehousing from this group?
@all
 
@Zane I'm going to go out on a limb and say "Not likely".
 
@Zane You want us to put you in a warehouse?
 
I wish I had a warehouse. I'd build a hockey rink in it.
 
Not like that...I was trying to get hlp on data warehousing...btw thanks for your replies @joran @gsee @JoshuaUlrich
 
@Zane Data warehousing with R? I think you're in the wrong room.
 
4:57 PM
We only discuss creepy abandoned warehouses here, and their potential for being renovated into hockey rinks.
 
no no... using R as a statistical data mining tool to get insights in the data sets populated in warehouse.@JoshuaUlrich
 
@DirkEddelbuettel I'll take over (though at 50 minutes after you said that, that would be the safe bet). I couldn't even come up with a lubridate based answer if I wanted to.
 
@Zane If you run into a concrete problem with some R code, feel free to ask on the main site. But we try to limit ourselves to silly and frivolous topics here.
 
@BrianDiggs lubridate doesn't have a wrapper for as.Date or as.POSIXct?
 
@joran Zaney ones, in fact
 
5:05 PM
@GSee Nope. is.Date, is.POSIXt and is.timepoint, but no additional conversion functions between the built in Date and POSIXt classes.
 
@BrianDiggs feature request!
 
@AriB.Friedman So perhaps we'd be open to discussing the data warehousing of clowns and penguins...?
 
Hello guys.. first time here.. hope to learn from you wise men :)
 
Who you calling wise, @ChinmayPatil? Wise-ass, maybe.
 
i was just being polite :)
 
5:17 PM
@ChinmayPatil There's no wise men here: just snake charmers and charlatans!
 
Watch your step, our wish bones are everywhere.
 
@ChinmayPatil welcome to the snark-bowl :-)
 
5:34 PM
:)
why is as.matrix((x > 0) + 0) better than ifelse(x>0, 1, 0) ... just curious
 
IMHO: (1) Will likely be faster for large matrices, and (2) Aesthetically I prefer the more nakedly vectorized code
 
@ChinmayPatil Politeness is way out of line here.
 
@JoshuaUlrich I'm impressed you know how to spell politeness.
 
5:52 PM
I can see why I am getting so many "warnings"
 
@ChinmayPatil Those give different results (matrix vs. numeric). Personally, I'd do it in a couple steps: y <- x; y[x > 0] <- 1; y[x <= 0] <- 0
Oh. never mind. I didn't look at the link you referenced. I assumed we were starting with a numeric vector instead of a data.frame
 
6:11 PM
is it ok to reply to really old questions ?
or necromancy frowned upon here?
 
Not frowned at all. If you're really good, you get a medal.
 
@ChinmayPatil It's encouraged, and there's a badge for it: stackoverflow.com/badges/17/necromancer
 
i see.. thanks
@GSee any reason in your TFX package you have not included functions to download historical data?
 
@ChinmayPatil Because he's lazy.
 
sarcasm is really this channel's creed eh ;)
 
6:22 PM
Sarcasm? No...
 
Especially during snark week (which seems to have been extended due its unexpected popularity)
 
@ChinmayPatil You mean like this tinyurl.com/DownloadTrueFX
 
aah.. yes..
 
Some Close Votes here wouldn't go amiss
-7
Q: Is there a way to omit the first column when reading a csv

h.l.mI have a csv file that is quite large, and so I only want to read the data in R that is relevant. The csv file is 4 columns wide and a several million rows down. But the first column is unnecessary, (as it is a repeated string for every row). Is there a way to only get the 2nd to 4th columns whe...

Close As Duplicate
 
I mention it in package?TFX. It says "Some version of that script may make its way into a future release of this package". But, see what @JoshuaUlrich said -- something about pots and kettles and laziness
 
6:31 PM
:)
 
 
1 hour later…
7:34 PM
@ChinmayPatil To be contrarian (which you may not be surprised to find after bumping into sarcasm and snark in this chat room), I actually prefer the second version (ifelse(x>0, 1, 0)) because it most closely represents the logic of the transformation: based on whether the count is greater than 0 or not, assign 1 or 0. The others give the same answer, but are optimizations that are useful is speed is a concern.
Also, that version generalizes better. Say the two conditions should be coded 3 and 7 instead of 0 and 1. For the ifelse version, this is simple. For the others, it is possible, but involves an additional mathematical mapping of 0,1 on 3,7 which further obscures the purpose of the code.
Also, in (x>0)+0 adding 0 shouldn't change anything, so the only reason it is there is for the side effect of conversion of logical to numeric. I'm not a fan of things that look like no-ops that are there only for side effects. I'd prefer as.numeric(x>0) which is explicit about what conversion is desired.
 
I'll second that. Clarity of code often trumps execution speed considerations for me.
can any of you explain the behavior in my answer to this question?
 
7:52 PM
Do'h. Except that (x>0)+0 preserves the dimensions while as.numeric(x>0) does not, so they give different results.
 
Code in pythone - bu it ill be interesting to all statisctick fans
1
Q: Number of target values in the one prediction

EmkanI use python's scikit-learn module for predicting some values in the CSV file. I am using Random Forest Regressor to do it. As example, i have 8 train values and 3 values to predict - which of codes i must use? As a values to be predicted, I have to give all target values at once (A) or separatel...

 
@Justin I'm not sure what about that ggplot behavior you find confusing...?
 
@Justin If group is unset, it defaults to the intersection of all factor aesthetics. Thus to start with, it is equal to gp. When you set it to x, you override that, not add to it (you want to be able to override and not just set). So what you want to do is set it to the intersection of xand gp which is what your latter example does. I tend to use intersect(x, gp) rather than paste(x,gp), but the result is (basically) the same.
 
Ah, it was the overriding the base grouping that I was confused by. I assumed that with something like fill that part of the group would be fixed.
In that particular case, using group=intersect(x, gp) gives the results 1 and 2 since they're all numeric.
 
I meant interaction, not intersect
 
8:06 PM
Random story: Upon discovering that one of our db modules had started using an entirely different system of unique id's for individuals, the system-wide dba told me it didn't matter because I could always just join on first and late name and get the same results.
 
Must be a Friday... I knew you did and still typed intersect.
That must be why DBA's get paid so much...
 
That is so wrong. Hope you don't have too many "John Smith"s in your data.
 
Mildly in their defense, the dba was not responsible for that module's id system "divergence", and was as surprised as I was. But I'm not asking him for help if I get stuck on some SQL, that's for sure.
 
I'm logging off for a few days. Going to Italia to an exotic animal exhibition. Cheers!
 
@RomanLuštrik Are you viewing the exhibition, or are you in the exhibition? ;)
 
8:12 PM
Yeah, I'm an exotic party animal. It turns out that I'll be both.
Helping out a friend who's a vendor there.
 
Neat. (I just couldn't pass that one up...)
 
Nor should you.
Life's a joke, make fun of it.
 
Yo, @Justin, apparenly you edited my answer before I was done writing it. Patience, grashopper and some patience for the elders with arthritic fingers :)
 
I'm doing my best to avoid real work today... a little trigger happy :)
 
8:51 PM
You could say I've been had as the OP is now the third version of his question: stackoverflow.com/questions/14529576/…
I think I withdraw at that point.
 
Quitter.
 
@DirkEddelbuettel Edit your answer to include the answer to something they didn't ask and tell them that they need to now edit their question so that it addresses your answer.
6
 
 
2 hours later…
10:44 PM
@JoshuaUlrich Thanks for the edit earlier on this one ( stackoverflow.com/questions/14527564/… ). I've attempted to clarify further.
 
Well done.
 

« first day (829 days earlier)      last day (2346 days later) »