News for hackers. Stuff that matters.
Re:Learn R Through Examples (2020) by civilized on Saturday June 05, 2021 @12:27PM (#27406382)
Here is my take on R as a guy who does stats as well as some software engineering in more mainstream languages like Python.

R is a fantastic DSL for data manipulation and statistical analysis, with both traditional and modern tools, on datasets up to the gigabyte scale. It has great, easy-to-use data structures and unparalleled APIs in the tidyverse. It is not the thing for the latest deep learning implementation on petascale data, but most data science work doesn't need or benefit from that. Surprisingly, some machine learning methods have their nicest APIs in R, because that's where the users of those methods are.

It has its warts, but so do JavaScript and SQL, and I think few people dispute that these are very powerful DSLs. Statistical analysis is just as legitimate a computing task as building webpages or querying databases. It is not the same as general-purpose programming, and it needs a good DSL.

Re:Learn R Through Examples (2020) by tylurp on Saturday June 05, 2021 @03:12PM (#27407736)
As an experienced R programmer that doesn’t do much statistics or have a background in computer science. What language characteristics does R lack that makes it a DSL instead of GPL?

Edit: I found an interesting quote from a guy named Martin Fowler about the subject.

“Languages can have a domain focus but still be general-purpose languages. A good example of this is R, a language and platform for statistics; it is very much targeted at statistics work, but has all the expressiveness of a general-purpose programming language. Thus, despite its domain focus, I would not call it a DSL.”

Re:Learn R Through Examples (2020) by ryando on Saturday June 05, 2021 @01:04PM (#27406712)
Agree with this. Nvim-R plus dplyr and the plotting libraries are the best tools I've found for manipulating and understanding the characteristics of a dataset quickly. Eventually I moved to Python for the specific reason that the R packages for interacting with cloud platforms couldn't really keep up with the development of those platforms, and I got tired of having projects that mashed together both languages. I haven't checked, maybe things have stabilized enough now that I would be happy going back to R.
Re:Learn R Through Examples (2020) by civilized on Saturday June 05, 2021 @01:16PM (#27406831)
That makes sense. I don't much like crossing streams between languages on a project. It's great if you can keep R for analysis and Python for production, but if R can't keep up with the wrangling part, you're a bit up a creek. I'm lucky in that most of my analysis only needs to query fairly well-behaved SQL databases.