Hacker News new | ask | show | jobs
by asdff 1931 days ago
I find with excel it takes just as much time to set up a spreadsheet to do what I want as it takes for me to do the same in R, usually a lot more time with Excel. Both pieces of software have learning curves, just to me R is the better tool for the job for working with tabular data. Excel forces you to hardcode your fomulas and ultimately adds a lot of cruft and time wasted, compared to R which is much more modular. That "min(A4, B1+C5)" is liable to break if your spreadsheet changes. R functions on the other hand are pretty well documented, and you could do anything you want in R after following a tutorial for a couple hours. Instead of having to hard code a position, you can refer to it relatively or by some unique identifier, so your calculations still work no matter how your underlying spreadsheet changes or is shuffled around (and familiar formulae like sum and min and max are there by the same names). It's way easier to do statistical tests and plot data consistently in R as well. Oh, and you can export to .csv or .xlsx from R if you'd like of course.
5 comments

1. You know how to program.

2. How does the UX for your R solution to the "DND Character Generation" problem compare to the screenshot from grandparent comment, for users not familiar with either R or Google Sheets?

Doesn't grandparent also know how to program? At this point we're just asking what threshold of UX either programmer cares about. I'm sure either could whip up a desirable UI in either execution.

I mean, I work with laymen that use Excel to encode multimedia content state machines and its not pretty (dreadful bespoke schema with all the caveats you can imagine) but it satisfies their need

Grandparent here. Yeah I know how to program, but the point here was to make my players a simple interactive GUI that saves its data somewhere we can all access together (e.g. the cloud). Doing that in R would be well beyond my skillset, even as an R user. Doing it with a web stack would be more appropriate, but even then it would have been a lot more work and I can't think how I'd do it without spinning up a server and setting up some http endpoints.
I think there's great potential for a solid web stack based on Excel. It can be done but I believe great scope. A nice undergraduate CS project.
> That "min(A4, B1+C5)" is liable to break if your spreadsheet changes.

I don't usually have that problem. Inserting or deleting rows or columns around the cells doesn't break these formulas. Only changing what type of information a cell contains would. Does this happen often for you?

Cell references in Excel are not hard-coded; they are automatically updated if you modify the spreadsheet by deleting or inserting other cells, and unless you use the $ before the col or row they automatically increment/adjust when pasted into another cell.

And you can just name a cell or range if you want to use a variable name to refer to some data in a pivot table or formula.

At no point do you talk about UI here -- for a character sheet (or most simple things), I want to control layout to some degree, let users edit some numbers, and see others automatically update. Obviously I could have a file full of constants and a bunch of print statements at the end, but is there anything nicer / more dynamic?
> I find with excel it takes just as much time to set up a spreadsheet to do what I want as it takes for me to do the same in R, usually a lot more time with Excel.

I mean, this is I reach for Pandas over Excel, but most people would be infinitely more comfortable with spreadsheets than specialized tools. Spreadsheets also happen to be useful enough for almost everybody.