Live data from Hacker News

The SAS vs. R Debate

inside-bigdata.com

31–40 of 44 posts

Re: The SAS vs. R Debate

#31
post #8

I use of both Python (pandas) and base SAS at work for UK government. I have lots of experience in SAS, and enjoy using it. The macro language allows for very succinct solutions to difficult data manipulation problems. However, given SAS's huge expense it's difficult for me to identify any 'killer' areas where it's significantly better than open source tools. Indeed, I find pandas faster and easier to use for many pr…

I regularly produce data sets that are too big for RAM, and not having to worry about that in SAS was a luxury.

I'd say SAS's two big "Killer Features" are the DATA step and SAS Press. I still have yet to find R or Python nearly as pleasant to work with for manipulating the data set itself when compared to SAS, and the SAS Press is excellent at putting out books detailing a given type of analysis, and how to implement it in SAS. I still turn to them for basic references even when not using SAS.

Re: The SAS vs. R Debate

#32
post #6
post #3

Earlier quoted context omitted.

Being a slightly improved Excel has significant advantages as well: It's more accessible to people who are not coders but need to do statistics on real data, i.e. almost all researchers. Although personally, I would use R/Python (the UI is more suited to me, and it's free, and I trust the results a little more, and I can read the code if I need to)... do you actually need anything more than SAS/SPSS provides? I doubt…

The way in which SAS is like Excel is that everything is a table. SAS is not very accessible, especially to non-coders.

I'd argue that SAS is much more accessible to non-coders than either R or Python, in that the SAS language is mostly an invocation of statistical procedures, rather than a full-on programming language.

From a field dominated by SAS, moving to R was a pretty steep transition, whereas when I approached R from having learned Python, things made a great deal more sense having been exposed to other programming languages.

Re: The SAS vs. R Debate

#33
post #4

Earlier quoted context omitted.

> SAS is basically a slightly improved excel. SAS is a pretty big system, and I have worked with SAS for about 10 years, and I can't see any similarity with Excel at all. Which part of the SAS system do you think resembles Excel ? Here is a list of their products ( http://support.sas.com/documentation/productaz/index.html ) Btw. I do think I am doing serious data analysis in a bank :-)

He might have only seen Enterprise Guide, which indeed resembles Excel. But that a good thing, actually.

That's my guess. Personally, for 99% of my uses for SAS, all I see is the script window, the log, and the output window. That's about as far from 'Excel' as you can get while still having an interface.

Re: The SAS vs. R Debate

#34
post #9

The article says this particular instance of the debate started in 2011. Things have shifted a little since then, and I think Python has won more mindshare with Pandas, SciPy, NumPy, and all the rest. I've used both Python and R, and think the next debate will be between those two, as people find that R is not a very good programming language and lacks decent libraries for things like web scraping. Python can be a si…

> The article says this particular instance of the debate started in 2011. Things have shifted a little since then, and I think Python has won more mindshare with Pandas, SciPy, NumPy, and all the rest.

In my field this isn't at all true - R is eroding SAS's market share, but Python is a non-entity.

Re: The SAS vs. R Debate

#35

Since SAS is a relatively simple language, why can't someone just write a transcompiler that supports a subset of SAS and move it to R? That way you have the best of both worlds (sort of). The most difficult thing about that is how you would treat "by" statements (SAS) vs the split-apply-combine (R). Self-plug: I sort of made a quick hack about a month ago for SAS-Python, I'm sure someone with more programming experi…

BAE Systems has a product called NetReveal that includes a compiler called "DataServer" which compiles a large subset of SAS into Java. Legend has it that the original author wrote the first version of DataServer in 6 hours on a train ride to visit his mother.

As a programmer, I was constantly frustrated by it. I felt that SAS as a language was pretty restrictive, especially when your algorithm wasn't a natural fit for the dataset model that it uses. It was like trying to shove a square peg into a round hole. It wasn't uncommon for me to sneak some Java straight into the output, but that wasn't really a sustainable / maintainable way to use it.

So your suggestion is doable, but I'm not convinced it's worthwhile.

Re: The SAS vs. R Debate

#36
post #2

Is this even a discussion? Anyone serious about analyzing data will use either R, Python (with Pandas/SciPy, etc), or Julia. For truly immense data sets that require pipelines, you'll use tools like spark, hadoop, etc - but SAS is basically a slightly improved excel.

I'm an R person, but I used SAS in a past life, and I have to say, this is very wrong. SAS is nothing at all like an improved Excel in look, operation, or user-base. It can do much of what R can do (build forecast models, ML models, even OR models), but it just looks very different. And the licensing model will make you pull your hair out. I ran into issues both with geography (not being allowed to use my license on…

SAS put out a GUI front end which helps automate stuff for the SAS base program sometime ago, which may confuse people.

Re: The SAS vs. R Debate

#37

Since SAS is a relatively simple language, why can't someone just write a transcompiler that supports a subset of SAS and move it to R? That way you have the best of both worlds (sort of). The most difficult thing about that is how you would treat "by" statements (SAS) vs the split-apply-combine (R). Self-plug: I sort of made a quick hack about a month ago for SAS-Python, I'm sure someone with more programming experi…

BAE Systems has a product called NetReveal that includes a compiler called "DataServer" which compiles a large subset of SAS into Java. Legend has it that the original author wrote the first version of DataServer in 6 hours on a train ride to visit his mother. As a programmer, I was constantly frustrated by it. I felt that SAS as a language was pretty restrictive, especially when your algorithm wasn't a natural fit f…

That is unfortunate. I have heard of NetReveal (I used the Detica platform at my previous job) never new that about DataServer though!

I suppose the demand just isn't there. If only more SAS users at least had an interest in programming...

Re: The SAS vs. R Debate

#38
post #22
post #9

The article says this particular instance of the debate started in 2011. Things have shifted a little since then, and I think Python has won more mindshare with Pandas, SciPy, NumPy, and all the rest. I've used both Python and R, and think the next debate will be between those two, as people find that R is not a very good programming language and lacks decent libraries for things like web scraping. Python can be a si…

Disagree. I've had an R server running in production for real-time analytics under heavy load in the last six months, and I have had exactly zero problems. Literally no down time. Additionally, weak scraping support is a myth: http://www.theswarmlab.com/r-vs-python-round-2-22/

I use a TCP client written by another UIC math professor and sed for most of my scraping needs.

Can you or anyone give me an example, _that is likely to be seen on any website_, that you believe cannot be solved with sed but can be solved with XPath?

The example at the URL you given above appears to have a target CSV file as its only requirement.

I routinely use HTTP pipelining and sed/tr to produce CSV files from websites.

As for R, I'm more curious about its database and analytics capabilities.

How does it stack up to kdb+?

Re: The SAS vs. R Debate

#39

Since SAS is a relatively simple language, why can't someone just write a transcompiler that supports a subset of SAS and move it to R? That way you have the best of both worlds (sort of). The most difficult thing about that is how you would treat "by" statements (SAS) vs the split-apply-combine (R). Self-plug: I sort of made a quick hack about a month ago for SAS-Python, I'm sure someone with more programming experi…

Since SAS is a relatively simple language

SAS isn't a language. It's a suite of (semi-integrated) products featuring numerous languages. Key among these are the SAS DATA step (analogous to awk), the SAS Macro language (which shares terms but is in fact distinct), a number of other global languages, a number of domain-specific languages (TABULATE, LOGISTIC, GRAPH, etc.), and some proprietary implementations of general standards (SAS SQL).

The best model for mapping from SAS to R is not to try to support all of SAS's functionality within R, but to use multiple tools. When UNIX was first created, with the awk and S languages ('R' is iterated 'S', Splus is the proprietary extension of S), awk was seen as the data pre-processor for S. Today you'd likely use R (statistical analyses, graphics, matrix language), awk, Perl, Python, Ruby, or C (general programming / data manipulation), a database tool such as sqlite or Postgresql (both of which have their own considerable analysis capabilities), and other tools as appropriate.

Trying to do everything in a single tool is a domain/application mismatch.

Re: The SAS vs. R Debate

#40
The problem with R is that it's just not a very good programming language. It's great for interactive analysis, but dismal for building higher level abstractions. It's like the PHP or MySQL of the data analysis world. Data types get magically converted all over the place, the global namespace is just a giant playground for every module to pollute, it has something like 5 different object systems all with subtle differences. All the defaults that are set for the convenience of interactive use undermine any kind of reliable use for building on as a platform (for example, the "simplification" concept where a 1 column data frame often magically turns into a vector).

I've forced myself to use R intensively for a couple of years now, but I must say it's still a relief every time I bail out and get back to a "real" programming language.

Post reply on HN