Live data from Hacker News

Why do we use R rather than Excel?

shkspr.mobi

181–190 of 266 posts

Re: Why do we use R rather than Excel?

#181
post #152

Earlier quoted context omitted.

> Anything important should not be done in Excel. Hold on a second while I go shut down the global economy for two years so we can teach everyone finance person how to program.

finance people who learn to program will outperform those who don't.

I’m a hobbyist programmer who has worked in various finance jobs and is now working in investment banking. I would love to use programming in finance but I have to say it’s come in handy very little.

Re: Why do we use R rather than Excel?

#182

Earlier quoted context omitted.

You highlight four issues: 1. Documentation is accessible via the interpreter. You can type ?funcname to get documentation or ?libname for the entry point for almost every library, or use the Help tab in RStudio, the most common interpreter. Package documentation is typically hyperlinked text and of a high quality. You can also see syndicated versions of library documentation online in HTML format. Here is for instan…

The syntax issues yeah that was a mistake to include. Although my confusion about = and Far more severe is the scant documentation online. Don't take this as an attack on the language or community. I'm a huge fan of Standard ML and it's arguably in a worse state! I was interested in supporting R in the first place because I knew of its importance (if only vaguely).

Really, really confused about your take on documentation. 9/10 you have documentation in the form of a pkgdown site with examples, parameter definitions, change log, articles, etc.

Here’s a good example: https://dplyr.tidyverse.org

Equally confused about your take on the community. R community is sort of a perfect example of an inclusive community actively trying to include everyone with organizations like “rladies” for women in tech.

Re: Why do we use R rather than Excel?

#183
post #166

Earlier quoted context omitted.

Yes, but often different contexts. Let's say my volunteer org wants to keep track of events, who volunteered in them, etc. and wants to give an award to the volunteer who gave the most hours. How do you do that in Python? Why would you?

For me, Excel is a tool mostly for entering data manually. In the case you described, it would be good for that purpose. I suppose you would have a column for each volunteer and then just enter data. Then you can read the file with python (pandas) and make a sum over the columns and give the one with most hours. Of course this case is also easy to do in Excel, however, the idea is that if you know more powerful tools…

It is also a reasonable output format. I have written more than one Python thing that ended up by generating an Excel which I then emailed to people. It was imperfect but saved me a lot of “can you make a graph blah blah blah” type work.

Re: Why do we use R rather than Excel?

#184
post #127
post #53

Earlier quoted context omitted.

Excel doesn't alter data without being asked either. What it does do by default is try to change how the data is displayed. If the column is properly set to the correct data type the data will be shown correctly because Excel doesn't change the actual data. Column types can be set when csv files are imported. The problem described in the article isn't an Excel issue. It is an issue of the geneticist failure to learn…

> Excel doesn't alter data without being asked either. What it does do by default is try to change how the data is displayed. This is easily falsifiable. In a "general" cell, when I enter 0002, it gets changed into 2, not just in display, but in actual content. When I change the cell type to text, it'll still be 2. Only if I enter 0002 after changing the type to text is the content kept. Similar when I want to have t…

If you enter it prior to specifying the formatting you are entering it as a date. The number you see when you change to text is the numeric value reflecting the date/data you entered.

Re: Why do we use R rather than Excel?

#185
post #52

This week I got a bit more familiar with R while adding it as a scripting language for a data IDE I'm working on (it already supported other languages). It is a very hard language and community to get into! The documentation is very sparse. Library documentation is published as PDF (I guess?) and also very sparse. The default `print` behavior is pretty hard to understand. It's 1-indexed and it took me a while to real…

This is the typical „CS-people“ reaction to learning R. R is a language written by statisticians for statisticians which can be a good but also a bad thing. Fact is that R is the lingua franca of statistics, most new methods will be first available in R, rarely in python, almost never in julia. Despite the superior design of julia, there are good reasons to still use R, for example, there are many state of the art li…

And as far as community support, when I was on the R user listserv, Prof Ripley from Oxford would explain why your question was using the wrong analysis for your data, explain what analysis you should use, shoe the sample code for the right way, and then mockingly show the dumb way you could have your question answered,. Like twenty emails each British morning. I learned a lot about stats from reading it. Not so much R syntax but stats and stats reasoning.

Re: Why do we use R rather than Excel?

#186
post #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…

100% this - I encourage junior data scientists to get more familiar with Excel when they start - R/python are definitely more flexible, but if Excel can sort you out it's always the quickest way.

Re: Why do we use R rather than Excel?

#187
I would have been surprised and intrigued if the title read "Why we use R instead of Python". I've used Excel myself as a student in 2003-05, when R or Python weren't known. And now I sometimes teach Economics students, and they all work either in R or in Jupyter Notebooks. Many of them routinely do what was unthinkable -- process 100s of thousands of records, do geospatial queries and joins, etc.

Re: Why do we use R rather than Excel?

#188
I would add testing, collaboration, and complex use cases.

There's no good way to check if you've made a mistake in the logic of your excel spreadsheet. You can easily test your R code.

If you need to work with multiple people excel is a nightmare. It works fine when one person needs to build something for themselves or just to show to someone else. When you get two or more people working together it's like sharing a keyboard with someone else.

Excel can do a lot of things, but there is a limit to what it can do. R or Python is typically what you would reach for when you need to do something beyond what excel is capable of.

Re: Why do we use R rather than Excel?

#189
post #66
post #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…

> 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 think the problem is more nuanced because Excel can do a lot . There is a large set of use cases and tasks that are possible in Excel but your team would be a lot more efficient and productive using a programming language instead. The trick is to recognise those tradeoffs and it it's not as simple as…

Most data scientists I work with just sneer at Excel. Using a programming language is often using a sledgehammer to crack an egg though - sometimes you just want to look at the data in the csv, and I still see people doing this in R/Jupyter - just open it in a spreadsheet, trust me - the UI is better.

Re: Why do we use R rather than Excel?

#190

Earlier quoted context omitted.

I've done this kind of conversion, not as a job, but on a case by case basis within my own work. An example would be taking a simple computation that I would share with people (mostly engineers) in the form of a spreadsheet, and instead turning it into a Python program, even replete with GUI. Here are some of the pitfalls that I've experienced. If I share a computation as a spreadsheet, people already know how to wor…

I’m doing this kind of task, and I tend to avoid any GUI and just have input and output files as simple text, CSV, or Excel spreadsheet. It seems to me that it’s the best way to have a satisfactory UX without too much headache.

Or just have a download the source data for the graph/table in Excel button on every page/for every data source. Sometimes it is nice to do your own cool D3 chart but still have a no-work-for-me answer to requests for slightly different graphs.
Post reply on HN