Live data from Hacker News

Why do we use R rather than Excel?

shkspr.mobi

211–220 of 266 posts

Re: Why do we use R rather than Excel?

#211
post #191

Earlier quoted context omitted.

Do you think the average finance department employee is going to do that?

Especially those departments should do so and learn to do it. Financial departments are always the ones complaining about the cost of mistakes, compliance risks (of the monetary kind) and doing due diligence. Preventing the production of wrong figures in financial excel sheets ticks all those boxes. They should bloody well be doing it, but I'm also not holding my breath ;)

[deleted]

Re: Why do we use R rather than Excel?

#212

Earlier quoted context omitted.

> I want to move a thousand files beginning with 'UTR-77' and ending with '.csv' 1. Use a file manager with stable sorting [1] (I use Thunar which does this, but I suspect lots of file managers keep the sort order stable). 2. Sort by type. 3. Sort by name. 4. Select the first file named UTR-77. 5. Scroll to the last file, and Shift+Click it. 6. Cut then paste to your desired directory. [1] - https://en.wikipedia.org/…

This feels pretty squarely in the realm of "but you could still do it manually". The CLI method still seems cleaner and faster, with less likelihood of error since you don't select the files manually.

I had the same initial reaction, and I think conversations like this often include desperate justification of GUI workflows driven by an inferiority complex.

But the parent comment was responding to a portion of its parent that specifically said "there's no option other than scripting". It sounds like he's responding to that, not making some general claim about the GUI being a better option.

Re: Why do we use R rather than Excel?

#215
Only slightly tongue in cheek: Removing the ability to save workbooks would still allow people use excel where it shines while not allowing people and organizations shoot themselves in foot by using subpar processes for anything you actually need to be confident about.

Re: Why do we use R rather than Excel?

#216
post #162

Earlier quoted context omitted.

As though mistakes wouldn’t happen with non-programmers working in R.

In R, you can use accepted methods of software development and engineering, such as version control, automated testing, CI/CD to catch mistakes and prevent them from causing harm. In Excel? Not really.

And there are massive bugs in programs that use these tools like the Linux kernel still.

Re: Why do we use R rather than Excel?

#217
post #40

If you need to do something once, use a GUI (Excel). If you need to do something ten times, use hotkeys and shortcuts. If you need to do something a hundred times, write a script (R). I usually use the command line as the example for why writing code and scripts are better than the more intuitive and lower-learning-curve GUIs. If I want to move a file from one folder to another then I just drag it across. Easy. If I…

> If I want to move a file from one folder to another then I just drag it across. Easy. Even this is easier with scripting, especially if you're already used to thinking in wildcards and tab-completion. Scrolling, hunting for files, dragging, clicking: these are inherently clumsier and slower steps, optimized for new-user intuitiveness and simplicity over efficiency. The upfront investment of making your brain think…

For those who haven't used it, ctrl-r in the command line is the best thing in the world. It does a reverse-search over previous commands. Set your max history size to unlimited, and your CLI will remember /all/ commands you ever type, making it very easy to find long, strange incantations that you figured out once, so long as you can remember some small part of the command.

For example, How did I do that magical ffmpeg thing last time? Just hit ctrl-r, type ffmpeg, and keep hitting ctrl-r to find previous examples until I find what I'm after.

Re: Why do we use R rather than Excel?

#219
post #178

Earlier quoted context omitted.

I often write a script even if I only have to do something twice. In this case, the point is not to save time, it's to be secure in the knowledge that I did the thing in exactly the same way both times, because it was the same script that did it both times. (And then it saves time anyway, because it turns out I had to do the thing 20 more times after all.)

Exactly. A little {insert favorite language} snippet is immediately inspectable, also weeks or months or years in the future.

You underestimate my ability to write code that I myself can’t make sense of years (or sometimes even months or weeks) in the future.
Post reply on HN