Live data from Hacker News

R Passes SAS in Scholarly Use

r4stats.com

51–60 of 126 posts

Re: R Passes SAS in Scholarly Use

#51
post #42

Some reasons I love / use R: Plenty of free high quality documentation and learning materials around R (just read anything by Hadley) Package manager. Super easy to find, install, and start using packages. Open source / Free Large community of users Extensive usage by the stats community. (If a new algorithm comes out, chances R there will be an R implementation) Easy to build and share your own packages via Github.…

A big problem with R is that it's just stats. The other day I wanted to do a simple loan amortization (simple PMT/IPMT in Excel). People say 'use R over Excel!'. Right. There are some clunky barely-working packages in R that do half of what you need and some stack overflow posts that mostly show how to do the other half, but that's no basis to build on. And don't get me started on string handling in R, or that there'…

There are many things wrong with R but basic plotting functions are one of its strengths.

Is this the way you did it? It seems pretty intuitive...

a=pi/180

x=1:360

plot(x,sin(a * x))

plot(x,a * cos(a * x))

plot(x,-a^2 * sin(a * x))

Re: R Passes SAS in Scholarly Use

#52
post #48

Earlier quoted context omitted.

I think you got downvoted because people didn't know what you meant. You're right though. Although R is laughably inferior to python as a programming language, it is vastly more work to try to do statistical data analysis in python than in R. I recommend using both languages and using csv or whatever format to exchange data sets.

With pandas, this is no longer true.

How pandas solves statistical problems or the thousand utility functions that are missing? Please, explain.

Re: R Passes SAS in Scholarly Use

#53

Am I right to believe that there is no way that proprietary scientific software can keep up with open source?

There is an over representation of open source in the amateur and student communities because open source it's usually free while commercial products are very expensive. It's true however that there is a tendency where open source is displacing more and more commercial products even in commercial settings. I, for example, prefer using python over matlab, even if matlab were free but I'm not very representative since I actually love programming and programming languages and don't mind working with virtualenvs and configuring emacs to my needs. Most engineers and scientists don't have the time or the intestest in learning to do so and prefer a suboptimal (in my opinion) language and more polished tools that Just Work. It's sad that to this day there are incredibly cool libraries like TensorFlow for python and yet there is nothing as easy to use for debugging or profiling as the matlab editor. I know there are alternatives, for example PyCharm, but I assure you that most non-software engineers are not willing to use "such complex" tools.

Re: R Passes SAS in Scholarly Use

#54
post #50

Earlier quoted context omitted.

If you haven't looked at the R ecosystem in awhile, there is a package for each of those use cases. (scraping/API: rvest; database: dplyr; parsing text: stringr, etc). Yes, Hadley Wickham is primarily responsible for the popularity of R.

Dplyr is not for databases at all. Its a piping operator that simplifies complex syntax a lot.

Yes and no - the dplyr example code heavily used pipes but that's really a feature of Magrittr package. You can used dplyr without pipes.

Plus dplyr essentially allows you to treat tables in a database as if they are data.frames.

Re: R Passes SAS in Scholarly Use

#55

R is really LISP with syntactic sugar and bindings to well respected high-performance FORTRAN matrix and math optimization codes. http://librestats.com/2011/08/27/how-much-of-r-is-written-in... It's great for bleeding edge scientific research. The results of many languages don't always match for advanced algorithms, but the open source nature of R, makes it easier to identify the problem areas. The R-core interpreter…

People say that, but I'd prefer the actual LISP syntax then (being a fan of xlispstat back in the day). I'm surprised nobody has created a "Lisp-flavored R" analogous to Erlang's LFE or Python's Hy.

Re: R Passes SAS in Scholarly Use

#56
post #51
post #42

Earlier quoted context omitted.

A big problem with R is that it's just stats. The other day I wanted to do a simple loan amortization (simple PMT/IPMT in Excel). People say 'use R over Excel!'. Right. There are some clunky barely-working packages in R that do half of what you need and some stack overflow posts that mostly show how to do the other half, but that's no basis to build on. And don't get me started on string handling in R, or that there'…

There are many things wrong with R but basic plotting functions are one of its strengths. Is this the way you did it? It seems pretty intuitive... a=pi/180 x=1:360 plot(x,sin(a * x)) plot(x,a * cos(a * x)) plot(x,-a^2 * sin(a * x))

Or

plot(sin) plot(D(sin))

(Programming from memory on my phone so might be slightly off)

Re: R Passes SAS in Scholarly Use

#57
post #22

Some reasons I love / use R: Plenty of free high quality documentation and learning materials around R (just read anything by Hadley) Package manager. Super easy to find, install, and start using packages. Open source / Free Large community of users Extensive usage by the stats community. (If a new algorithm comes out, chances R there will be an R implementation) Easy to build and share your own packages via Github.…

Basically this. Certainly not the worst language (SAS), but intangibly less pleasurable than python or most other common languages I've used. Maybe that's because I'm not a 'real' stats person though and ~ notation still takes me a minute to grok. And there is no challenger on he horizon for it's dominance in available packages. And at least it's not SAS. My theories: A) Stat people use R because because they don't k…

No. R is a language that is beautifully well suited to data analysis and interactive computing. Stat people don't use it simply because we don't know better.

Re: R Passes SAS in Scholarly Use

#58

R is really LISP with syntactic sugar and bindings to well respected high-performance FORTRAN matrix and math optimization codes. http://librestats.com/2011/08/27/how-much-of-r-is-written-in... It's great for bleeding edge scientific research. The results of many languages don't always match for advanced algorithms, but the open source nature of R, makes it easier to identify the problem areas. The R-core interpreter…

I would love to know what you mean by data wrangling because I think R has a lot of good tools for it.

Re: R Passes SAS in Scholarly Use

#60
post #47

I think Python is the biggest hidden gem in statistics. It's had a tremendous impact on machine learning and algorithm development, yet traditional statisticians still rely on SAS/R/Stata/MATLAB. All of these languages have libraries that produce the same results, the difficulty is mangling the data into the correct input format. Python's list comprehensions are much, much easier to use than MATLAB matrices, R's data…

I'm glad I read this comment. After checking some of the docs I think I will have a go at Python for data wrangling. List comprehensions look... friendly. R still rules for plotting and running canned statistical procedures but sometimes I feel like if I stop programming R for a week I forget how to use it effectively... E.g. Forgetting to add stringsAsFactor=FALSE to everything, forgetting rbind() can overwrite colu…

I'd recommend reading http://r4ds.had.co.nz for an R workflow that eliminates a lot of those pain points.

(Except for infix string concatenation - I've never really understood why people prefer that to paste(). Maybe if you're not thinking in vectors?)

Post reply on HN