Live data from Hacker News

Why do we use R rather than Excel?

shkspr.mobi

21–30 of 266 posts

Re: Why do we use R rather than Excel?

#21

IMO this really asks the question: Why is there not a code view for an excel spreadsheet? I get that some of the basic operations probably create expressions that are too wordy / very "specific data" intensive. That is, if you took the first step and just did your best to create that code view it would have a lot of stuff conditional on specific things. But it's the next step that gets interesting. Now that you've go…

> Why is there not a code view for an excel spreadsheet?

Isn't that VBA?

Re: Why do we use R rather than Excel?

#22
post #5

For small datasets and simple charts, I'm not sure there are any compelling reasons to use R instead of Excel (unless you're already more comfortable with it). Plus, Excel is great for beginners - most people wouldn't need a class to draw a basic chart. The more complex the analysis, the more reasons there are to get out of Excel.

The "spreadsheet" interface is now universal and not limited to excel. You have a completely equivalent thing with gnumeric, or libereoffice's calc, for example. This interface is really great for kids, for example to compute averages and simple formulas, before they learn "serious" programming. I was taught how to use spreadsheets in school and it is easily one of the most useful things that I learned there.

Fair - I was using "Excel" when to your point I meant "a spreadsheet".

Re: Why do we use R rather than Excel?

#23

IMO this really asks the question: Why is there not a code view for an excel spreadsheet? I get that some of the basic operations probably create expressions that are too wordy / very "specific data" intensive. That is, if you took the first step and just did your best to create that code view it would have a lot of stuff conditional on specific things. But it's the next step that gets interesting. Now that you've go…

You might want to try out Power Query (get & transform).

Step-by-step repeatable transformations where the UI records steps and writes code in the background.

Almost exactly what you're talking about, and comes out-of-the-box in the last few versions.

Re: Why do we use R rather than Excel?

#24
For non-programmers who do any kind of data processing, spreadsheet applications (Excel, Numbers, Google Sheets) are the closest thing to programming they have, and have a lot less overhead - just throw in the data, write a formula, you get results, no compilation or fidgeting with input and output and so on.

The steps of an algorithm are reflected by cells that reference cells that reference cells.

I've always thought that every highschooler should be taught how to use Excel properly, it really is a superpower in many contexts.

Re: Why do we use R rather than Excel?

#25
post #6

Wow those reasons don't sound very compelling to me! (I'm a programmer but don't know R.)

Honestly i struggle with it. My partner recently wrote an R package (phd biology) and I’m a developer. I had done a bit of R but nothing substantial. By the end of the project i couldn’t think of a compelling reason not to use any other language. The R tooling is clumsy, the language isn’t great…the built in graphs are ok? It feels like the reason it’s popular is mostly just people not wanting to update skills becaus…

I was a C++ developer, and I love R for data analysis. I wouldn't write a compiler in it, but it's just incredibly easy to do data analysis in it. So it's not a question of skills -- it's just well-designed for the task it was designed to do.

Re: Why do we use R rather than Excel?

#26
There is no reason to use R when Excel can do the jobs. It is when Excel can’t handle the task at hand, R shines.

I am well familiar with R, but for simple data manipulation, quick chart, pivot table, usually resort to a spreadsheet program. I maintain my Options Trading Journal in spreadsheet where I record all the Options trade I made, positions I hold, P&L, etc. I just can’t imagine doing that in R.

R starts with CSV, Excel ends with CSV.

Re: Why do we use R rather than Excel?

#27
R isn't interactive or visual like Excel. Excel's learning curve is a lot less daunting. Also, Excel is ingrained in the accounting culture and well supported by peers. Plus Excel is everyone's default database and form software.

None of the article's reasons matter to non-IT people and no IT department has the juice to override the CFO and accountants. Unlike, every other interactive tool that displeases programmers, Excel survives.

If you want R to replace Excel you need to build an interactive front end that can do everything Excel can as easily as Excel. Sitting in a class is not and option.

Re: Why do we use R rather than Excel?

#28
Best 'ah ha' moment for why R (or python, matlab, or whatever) might be useful is to have someone do tedious work making a bunch of charts and formatting them in Excel. Oh, and histograms. Oh, or confidence intervals on your linear regression.

Pivotcharts (and tables) help quite a bit for removing some of the tedium, but now suddenly it's interactive. Sometimes you want a format where BAM, everything is there laid out. There's nothing to misclick, all the tables and charts are there, you can just tell whoever, "look at the 3rd figure from the top on the 2nd tab".

The other things that people usually laugh at excel about (aside from silently changing values... that's just baaaaad) is the gong-show of naming files and versioning. R and friends + CSVs by themselves don't fix that problem. They just make it somewhat easier to solve (as in they play with git better).

Re: Why do we use R rather than Excel?

#29

These reasons are valid of course. But Excel is installed on most of machines, R or Python isn’t. We all know how people like a “binary” that just runs everywhere… Overall, for serious data analysis work, I’d use R or Python, but Excel is popular enough to have its place, just need to know the risks.

How about other solutions e.g. deno+typescript?

Re: Why do we use R rather than Excel?

#30
post #21

IMO this really asks the question: Why is there not a code view for an excel spreadsheet? I get that some of the basic operations probably create expressions that are too wordy / very "specific data" intensive. That is, if you took the first step and just did your best to create that code view it would have a lot of stuff conditional on specific things. But it's the next step that gets interesting. Now that you've go…

> Why is there not a code view for an excel spreadsheet? Isn't that VBA?

Well, I'm not a VBA / excel expert -- but my neophyte view is that VBA is used to add code to excel, which is great -- but it's not the same as every single spread sheet is automatically creating a "this VBA is the equivalent of your spread sheet."

Again, not an expert. I'd expect I've never written one line of VBA. (Yay for me!)

Post reply on HN