5 ms·
> R is certainly a unique language I'd say R is a _terrible_ language. Its types are just really different from every major programming language, and it's horr
by randomsearch 11y ago
> R is certainly a unique language
I'd say R is a _terrible_ language. Its types are just really different from every major programming language, and it's horrible for an experienced programmer to use.
I totally agree that R has fantastic libraries, but I'd like to see people focus on improving libraries for Python rather than sticking with R, which as a language is less well-designed than Python.
[I use R for most of my stats, I also use Matlab and Python]
- sweezyjeezy 11y agoI'd also say the CRAN repository is awful, it discourages collaboration, and is typically written by small groups of academics who write the worst documentation I have ever seen.
- xixi77 11y agoI blame the R documentation standards. They force a package author to produce a useless alphabetically-listed pdf, and many people just stop at that point. Without any standards at all, people would have at least produced a readme.txt, which would have been a huge improvement -- e.g. I much prefer working with unfamiliar user-written Matlab packages :)
- lottin 11y agoI don't know why so many people complain about R documentation, I think it's pretty good. The PDFs are useless for sure, but you don't have to use that. Emacs displays documentation pages in a split window. Or you can use a web browser. https://stat.ethz.ch/R-manual/R-devel/doc/html/packages.html https://stat.ethz.ch/R-manual/R-devel/doc/html/packages.html
- xixi77 11y agoFunction docs are fine, but they are not really that helpful in figuring out how to use a new package.
- IndianAstronaut 11y agoIt certainly needs a Pypi like rating or popularity system.
- pvaldes 11y agoIt seems that you are looking for vignettes in fact. Examples of use library('zoo'); vignette('zoo'); ##### library('ggplot2'); vignette(package='ggplot2')
- xixi77 11y agoI am (sort of); but most packages don't have vignettes. Zoo and ggplot2 (and a few other major packages) have great documentation, but they are an exception.
- xixi77 11y agoHmm what do you mean about the types being different? My experience was exactly the opposite -- first time I saw R syntax (actually, it was S-Plus back then...) , I thought it was the most intuitive and powerful system I've ever seen -- this was after fairly extensive experience in C and C++, as well as a few others. Now, I don't quite think so any more, because there are many rather tricky things buried under the surface (e.g. how many people really understand how exactly environments work?) -- but the majority of R programmers will never have to deal with them in their code... Also, I have definitely done general-purpose coding in R -- for a lot of things it is completely adequate. Python has more general-purpose functions and libraries of course, similarly to how R has more statistical ones.
- hadley 11y agoI think you're wrong. R is an excellent language, targeted specifically around the problems you commonly see when doing data analysis. On the whole the standard libraries aren't particularly good, but I think the language is good. That said, the language is often taught poorly. Here's my attempt to do better: http://adv-r.had.co.nz http://adv-r.had.co.nz
- bigtunacan 11y agoHadley, Thank you for all of your hard work! Keep on keeping on; your contributions have been phenomenal!
- randomsearch 11y ago> as it explains some of R’s quirks and shows how some parts that seem horrible do have a positive side. That sounds promising, I'll check it out, thanks. I think R is a great tool, but I maintain that it is not a well-designed language by modern standards.
- mbreese 11y agoI think R is a great language for certain applications - namely statistics and some data analysis. Your work has certainly made it better. However, from a computer language design point of view - it leaves a lot to be desired. It's type system is seems very complicated and while the language tries to do what it thinks you want, it's not always clear what is going on (are you working on a matrix or a dataframe that has been cast into a matrix?). For me, R is one of those languages that is good in a certain domain, but once you get out of that domain, it makes things more complicated than they need to be. It just isn't a general purpose language. By far, the biggest problems I've seen have been people who only know R (mainly stats people or biologists) try to do something in R that would be a quick 10 line Python/Perl/Ruby/whatever script. Normally for a language design, you aim to make easy things easy, and difficult things possible. For R, it seems like it makes difficult things easy and easy things difficult. Maybe that's the tradeoff that was needed. :) That said - please keep doing what you're doing. You've made my R work vastly easier.
- solomatov 11y agoCould you give a couple of examples, where R is substantially superior to Python?
- geomark 11y agoI'm not qualified to comment on how good or bad a language R is. But it is maddening how package developers don't follow some convention for naming functions. I load a package that I haven't used recently and I know the function I want but can't remember if it is called my_function, myFunction, my.function, or MyFunction. Google published an R styleguide, https://google-styleguide.googlecode.com/svn/trunk/Rguide.xml#identifiers https://google-styleguide.googlecode.com/svn/trunk/Rguide.xm.... Does anybody follow it?
- xixi77 11y agoDefinitely with you there. Even perl has more consistency. And thanks for the guide link! :)
- jkyle 11y agoI've used python for years, decided to teach myself R for a masters class I'm taking. I have to disagree. Its main model is generic function method dispatching. It can feel odd at first to someone coming from the C++ style of OO where objects own methods, not methods owning objects. But it's a legitimate OO style with its own advantages. [1] I've found the more I use R, the more intuitive a lot of its operations are. It's relatively easy to "guess" what you ought to do to accomplish what you want. More so then other languages I've learned. 1. https://en.wikipedia.org/wiki/Dynamic_dispatch https://en.wikipedia.org/wiki/Dynamic_dispatch
- solomatov 11y agoWhen people argue that R is terrific language, I remind them that it has 4 (four) objects systems which differ in subtle ways between each other. It's programmers' nightmare. It's not the worst language in the world, but it isn't terrific language either.
- jghn 11y agoAs an experienced programmer who started using R in the early days I feel that dealing with its quirks got me ready for the current modern languages