When to use Excel, when to use R?
michaelmilton.net
michaelmilton.net
Excel is better if you want to pore over the data: study a piece, scroll down, study some more. R is better if you can easily pinpoint the areas you think are interesting and index directly into the array. Excel has indexing capabilities (F5 which goes to an address), but not by row/column names.
Additionally, you can't do multi-step analysis that involves segmentation/sub-setting of the data very easily with Excel. This is related to the first point about changing an underlying data set or its dimensions. There are ways around this, but they are VERY annoying.
I use R for the majority of my analysis. I used to be a Matlab user but needed to find a cheaper tool when I left my job. I still use excel for simple data inspection and when I need to send my analysis to other people to peruse.
In certain circumstances you are right. Wanting to use the same spreadsheet for a very, very similar task is often annoying. This can be avoided if you knew from the start that you wanted to make something more reusable, but sadly that isn't always the case. Of course there are ways of automating them (VBA as you mentioned, or DB connections when appropriate, sometimes UDF, or just organizing the data in the correct way) but this is definitely one of my major annoyances.
"Excel has indexing capabilities (F5 which goes to an address), but not by row/column names."
Actually with the name manager you can do this. Simply name the row(s) and column(s) you want to index by, press F5, and type "my_col,my_row" and you are there. It even does the "and" selection for you, which you can easily exit out of if you want. Not sure if it is in versions prior to Excel 2010, but I don't really find myself using this all that much.
"Additionally, you can't do multi-step analysis that involves segmentation/sub-setting of the data very easily with Excel. This is related to the first point about changing an underlying data set or its dimensions. There are ways around this, but they are VERY annoying."
Your first statement is only correct if you mean "you can't do some multi-step analyzes" because some of them are just plain simple. Also, I don't find the occasional annoyances (which typically have to do with using match(), vlookup(), cross_product(), or similar functions) anywhere nearly as annoying as some of the other things I have to deal with when programming. Dates can be a pain in the ass. Even in Ruby.
I'll be clear in saying I have no idea about what R can do. I've only toyed with it due to lack of time, but I do know that Excel can do a bunch of really cool things. Solver, remote UDFs written in any programming language (including Ruby running on a linux box), forms for pointy haired bosses, pretty awesome charts if you know what you are doing, cubes, goal seek, data tables, macros, formula auditing, db connections, etc.
What I don't like is the general vibe that Excel is, and only is, for MBAs and R is, and only is, for comp sci kids. That just isn't true, and I don't have to know anything about R to make that claim because I know some comp sci kids some of the time get a ton of value out of Excel. Right tool, right job.
If you can "grasp" your data by looking at it, use excel. If your data is too much to look at, use R.
Excel lends itself more to shallow exploratory approaches, while with R, you have to think first (or rather: always).
http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/
Screenshot: http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/Rcmdr-screenshot....
www.sagemath.com
As a consultant I'm always constrained to use the greatest common denominator - that is, something that my clients can use, modify and extend themselves after I leave. In 99.9% of the cases, that means Excel, regardless of the task.
I will do serious exploratory analysis in R and then show my conclusions and maybe a few alternatives in Excel, but that doesn't mean you have to always work in Excel. Further, I could not be anywhere near as productive in Excel as I could in R.
Let's further assume he's suddenly inherited a large volume of load testing data and a mandate to "make something out of it."
What's a starting point? I, I mean, he hears about the great visualization stuff in R and understands the importance of it but has no clue where to start.
Would HN have any advice for him?
I'd say R is much closer to how a software developer is used to work than a spreadsheet. But I understand that many people who have no practice in software development would rather choose a spreadsheet in such a situation.
Here, let me rephrase it monosyllabically so that you're capable of understanding the question:
Which "FM" would be good for me to "R"?
1. Tutorial
2. Language definition
3. Import/Export + sqldf or rodbc
4. Either Lattice[1] or ggplot2[2], and [3]
I'm glad I could be of help. :-)
Also, to make nice looking plots, you might as well dive straight into Hadley Wickham's ggplot2 once you've gotten through the very basics: http://had.co.nz/ggplot2/
This stats course from Berkeley isn't bad, too: http://www.stat.berkeley.edu/classes/s133/schedule.html
CS: {R, Python, Matlab, Mathematica}
Basic Stats Research: Same as CS people.
There's a ton of overlap between stats faculty and cs faculty these days - machine learning (usu. within AI) being the field of overlap in CS.
This blog posts points out a list of specific gripes about the language: http://tjic.com/?p=10739 There is some real weirdness to this language.
The R Programming Language for Programmers: http://www.johndcook.com/R_language_for_programmers.html does a lot to ameliorate this, but the fact the weirdness is there at all makes a programmer a little uneasy.
I can't let this stand as a blanket defense of crappy languages. We have Lua. We have Python. We have Scheme. We have multiple other languages that can be used as a good way to access the goodies provided by your wonderful hand-crafted libraries regardless of what they do. There is no reason for you to invent your own language just so people will be able to use your library code from a REPL.
Sadly, back in the dark ages, this was not true. However, in the future, anyone who tries to defend the horrible design of a new language with "Think of it as a DSL" gets to debug a 1000 KLOC application written in ANS COBOL 1968, which is a DSL for fixed-field database munging.
The point is though that S/R isn't that badly suited for what it was created for. There are a few pitfalls but those are explained in the langage definition. But unfortunately nobody RTFM nowadays (like people used to do back then in what you call the dark ages) because it's easier to start screaming for Mommy and write stupid blog posts that prove nothing but that those people haven't read the language definition.
And BTW, python sucks.
The second article probably would've done better to use m <- matrix(1:6, nrow=2) and m <- matrix(1:6, nrow=2, byrow=TRUE) as examples. Maybe matrices and arrays are implemented as contiguous ranges of memory underneath -- vectors -- but the language/standard library has plenty of functions dealing with them at a higher level, and you can live entirely within the abstraction if you like (although you may pay a price in speed, especially when constructing the initial structure). ("array" does not take a "by.row" argument.)
I guess I agree with the overall sentiment, but I find most languages to be lousy for one reason or another. (Python certainly has some warts, some in common with R -- lack of consistent naming conventions in the standard library for one.) The vector-oriented functions, convenient syntax for regression, the large library of stat functions, the packages, etc., make the pain worth it. And if R is from non-programmers, wait till you see SAS.
So I'd condense the argument to: if you're not comfortable with R/Illustrator and don't have time to learn, use Excel.
excel? are you kidding me
i've used matlab but not R. For machine learning, I found matlab great because of its great matrix support.
what's the pros/cons of R? what advantages does R have over matlab?