Live data from Hacker News

A newcomer’s (angry) guide to R

arrgh.tim-smith.us

111–120 of 232 posts

Re: A newcomer’s (angry) guide to R

#111

Having used Python, JSL, Julia, R and Matlab; I agree with most of the things in R. R is an extremely ugly language. It seems to be created by people who wear capris and uggs (both at the same time). But, R has incredible packages, especially the work done by Hadley Wickam. ggplot2 is beautiful. It is utterly gorgeous. It is what Ted Baker is to the capri guys that designed the language itself.

ggplot2 produces beautiful graphs. I don't think it's beautiful as a package -- the syntax is strange and reflects an earlier evolution of the ideas that went into the tidyverse. Notably the use of + instead of chaining operators, the use of a custom "ggproto" object system instead of S3 (which makes extensibility a nightmare), and the superfluous presence of the aes() function (rendered unnecessary by better lazy ev…

> the syntax is strange and reflects an earlier evolution of the ideas that went into the tidyverse.

Because it's the "grammar of graphic" see the link below.

https://ramnathv.github.io/pycon2014-r/visualize/ggplot2.htm...

If you don't like that syntax use another library. But ggplot2 how you code graphic like that is amazing for me and many other people. I've tried SAS and Matlab and ggplot2 is the best.

Re: A newcomer’s (angry) guide to R

#112
post #61

The first time I dived into R, I was confused. The second time, I had a purpose and found enough code to copy to achieve it. I was rewarded. The third time, I had a more complex problem demanding use of JSON from Elastic Search, and found that the two packages out there in git are basically orphanware, use dplyr in extremely confusing ways, and offer little or no advantage to simplistic HTTP fetching and direct to JS…

Yeah I don't get these comment comparing Lisp and R rather Python and R.

R is such a bad language to learn FP in.

Re: A newcomer’s (angry) guide to R

#113

Earlier quoted context omitted.

Well pip install library needs root, which you probably don't have. So now you have to teach them about making, and acitvating, virtual environments. Also, they can't easily search through the packages in a nice GUI and just click on the one they want to install.

>pip install library needs root Hmm, not really. It's actually advised against [1]. [1] - https://askubuntu.com/questions/802544/is-sudo-pip-install-s...

Makes it fun when running on a VM in the cloud which only has a root user. Docker becomes almost essential to preventing errant Python scripts fudging up the system.

Re: A newcomer’s (angry) guide to R

#114
post #19

HN is predisposed to hate R because everyone here is coming from a "real" programming context. Their concerns are generally valid, but they should keep in mind a lot of people using do not have a software development background and do not care that the language is not elegantly designed: they just want to get analytical work done. In that respect, R is far, far superior to Python. Even something as simple as installi…

No, you are wrong. R is terrible , and especially so for non-professional programmers, and it is an absolute disaster for the applications where it routinely gets used, namely statistics for scientific applications. The reason is its strong tendency to fail silently (and, with RStudio, to frequently keep going even when it does fail.) As a result, people get garbage results without realizing , and if they're unlucky,…

Completely disagree

Re: A newcomer’s (angry) guide to R

#115
I use R a lot and I have to say some of these comments are weird.

1. R and Lisp are hardly alike even if it was inspire by it. It's like saying Erlang and Prolog is very similar. If you want learn FP do it in Erlang, Lisp, Haskell, etc.. Don't do it in R, it's half baked.

2. R syntax is ugly with warts. But built in datatype like dataframe, factor type, NA (missing value notion) value, make this language much better than many languages out there for dealing with data. Subsetting dataframe is a breeze even in base R.

3. There are many many advance statistical packages only in R. GLMnet was was in R for 4-5 years before someone decided to port it to Python. You can argue that there might be alternative package. But the statistician that created ridge, elastic, etc... method made GLMnet. There are many statistician out there that just implement their latest method in R. If you want to learn a subject in statistic there is probably a book out there and it'll have an R package and code to come along with it. Next to that will be SAS. There are very few stat book with python packages. You want to learn bayesian statistic? Social Network Analysis? There's a book for it with R code and a package to do that. Good luck finding one in Python for these subfield of statistic. There's a bayesian hierarchical analysis in Ecology and that book is in R.

4. ggplot2 is amazing for static graphic. R doesn't have good dynamic graphic out there and I kinda meh with Shiney. If you hate the syntax then you may learn to appreciate it by reading it from the creator https://www.r-bloggers.com/a-simple-introduction-to-the-grap...

Re: A newcomer’s (angry) guide to R

#116
post #37
post #19

HN is predisposed to hate R because everyone here is coming from a "real" programming context. Their concerns are generally valid, but they should keep in mind a lot of people using do not have a software development background and do not care that the language is not elegantly designed: they just want to get analytical work done. In that respect, R is far, far superior to Python. Even something as simple as installi…

Another feature for this audience is the philosophy that functions shouldn't have side effects. You can still do (several types) of object oriented programming in R, but it does take away some of the ways in which non-programmers shoot themselves in the foot. I've come to really like the way environments work in R, as well.

A sane language shouldn’t need three different object systems.

Re: A newcomer’s (angry) guide to R

#117
post #106
post #97

Earlier quoted context omitted.

I'm not sure I understand this, and I'm genuinely interested in why it would be. I find zero indexing logical: zero is the first natural number and is thus a fine candidate for being the first ordinal. In my experience most mathematical series lose nothing in terms of elegance or readability by being indexed from zero instead of using more traditional indexing from one.

It seems needlessly confusing to me to refer to the first number in a series as the 0th number. 0-based indexing is only good for offset counting, which is very much based on having a mental model based on pointer arithmetic for a number sequence.

Which years are in the decade the Twenties?

Re: A newcomer’s (angry) guide to R

#118

I learned R coming from Java, Node, PHP and Python and I love it !!! It is awful as an application development programming language, but it was never designed for that purpose. It was designed for STATISTICS. Try to achieve advanced statistics with your traditional software engineer's preferred language and see which language you hate then. The only tricky R concepts to learn for newbies are: recycling, formulas and…

I'll take python over R any time.

Re: A newcomer’s (angry) guide to R

#119
post #76

Earlier quoted context omitted.

And pip s upgrade process for packages is almost non existent, while R supports that very, very easily.

Never had any trouble with `pip install --upgrade library`. Not sure if there's support for upgrading all packages at once, though.

There is no such support for multiple packages at once. R can do it though.

Re: A newcomer’s (angry) guide to R

#120
post #71

Earlier quoted context omitted.

And there is litterally no equivalent to dplyr and ggplot2 in Python. Those alone can make a huge difference in how many lines you need to write to do something.

ggplot2 has plotnine ( http://plotnine.readthedocs.io ) which has a nearly identical API. I've found though it's not perfect, you can get closer to dplyr with JS-style method chaining on Pandas.

I tried plotnine before and its far from covering everything ggplot can do. And chaining on pandas can make things unreadable compared to dplyr.
Post reply on HN