Live data from Hacker News

One Year with R

github.com

31–40 of 266 posts

Re: One Year with R

#31

What needs to be added is that before R the reproducibility problem in science was compounded by the fact that analyses were done with proprietary software limiting communication and replication of those analyses. This was and continues to be a major problem, particular in some fields, but at least now there is a common widely used language that can be used to overcome this. I wouldn't focus on idiosyncrasies but rat…

I don't see how R specifically addresses the reproducibility problem, It's been around for almost 30 years and before its recent rise in popularity, lots of science was done in C, perl, fortran etc. Not to mention that actual dependency versioning is pretty poor. I struggle to run other people's R code after about 6 months (especially if they used the tidyverse as it pulls in hundreds of unstable dependencies) and nobody records what package versions are used and functions are seemingly deprecated every week.

Re: One Year with R

#32

> R has two types of empty string: character(0) and "". I understand it's frustrating trying to use a language you don't understand. And instead of reading the language manual you go on rambling. "" is an empty string (almost) as you know it from other languages. character(0) is an empty vector of type character (i.e. a vector with no elements). This vector doesn't even contain an empty string. R is a vectorized lang…

> I understand it's frustrating trying to use a language you don't understand. And instead of reading the language manual you go on rambling.

I'd agree with this assessment. If you start doing R and it feels weird to you then -- in my opinion -- you're probably in the wrong place. Meanwhile, for the cognoscenti -- the researcher, the statistician -- R behaves just as you'd expect. That is the draw -- a language developed around statistics.

R is not a great computing environment for computer science. E.g. writing iterative algorithms. Almost everything worth a damn in R is written in C++ and then FFId in. Those who do not want to use C++ can write their algorithms in Python or Julia -- and they often do. Arguably the defacto for computing oriented machine learning is Python, not R.

Re: One Year with R

#33
post #8

Earlier quoted context omitted.

> For my use case, R is absolutely terrible compared to some for profit statistical package / language. Which one? I've switched most of my work over to Julia, but I'd much rather use R or Python than Stata or SPSS.

I don't understand the use case for SPSS. My local university is training their neuroscience researchers on it, which seems so odd in 2022 with Julia or python sitting right there.

SPSS was originally created for social scientists and psychologists. It allows people who usually don't have really a clue what they are doing, to create something that looks like science. Later on it was marketed as a predictive analytics suite for business minded people.

From time to time, I still have to use SPSS. Again and again I'm flabberghasted how bad this overpriced piece of software is.

Re: One Year with R

#34
post #20

Long-time R user here. Yes, many of these points are valid but I still think R is unbeaten when it comes to speed in (tabular) data exploration. In the article you mention that you missed using data.table - a significant portion of the problems you named would be solved or at least weakened by using data.table. Started working with it many years ago and never looked back. It's easy, powerful and efficient to use. I a…

>.loc() anyone?

What is wrong with .loc, in your view? Genuine question. I used to dislike it but I've been using pandas for a while and I've gotten comfortable with it, and I've forgotten the reasons I used to dislike it.

Re: One Year with R

#35

> R has two types of empty string: character(0) and "". I understand it's frustrating trying to use a language you don't understand. And instead of reading the language manual you go on rambling. "" is an empty string (almost) as you know it from other languages. character(0) is an empty vector of type character (i.e. a vector with no elements). This vector doesn't even contain an empty string. R is a vectorized lang…

I'm going to side with the author here: if he read "Advanced R", "R for data Science", "The R Inferno", "Rtips. Revival 2014!", the official "An Introduction to R", "R Language Definition", and "R FAQ", and yet he still has problems with the language, then maybe the language is to blame.

And even if the author is the problem, I wouldn't accuse them of not reading enough.

Re: One Year with R

#36
> [discussing how c(list(1, 2, 3), LETTERS[1:5]) is not what the author would expect] To get list(1, 2, 3, LETTERS[1:5]), you must do something like x The following works and it looks quite natural:

c(list(1, 2, 3), list(LETTERS[1:5]))

Re: One Year with R

#37

> R has two types of empty string: character(0) and "". I understand it's frustrating trying to use a language you don't understand. And instead of reading the language manual you go on rambling. "" is an empty string (almost) as you know it from other languages. character(0) is an empty vector of type character (i.e. a vector with no elements). This vector doesn't even contain an empty string. R is a vectorized lang…

I'm going to side with the author here: if he read "Advanced R", "R for data Science", "The R Inferno", "Rtips. Revival 2014!", the official "An Introduction to R", "R Language Definition", and "R FAQ", and yet he still has problems with the language , then maybe the language is to blame. And even if the author is the problem, I wouldn't accuse them of not reading enough.

Or maybe the language just isn't for every one and for every usecase. I would be hesitant to write something customer-facing in R. But it's great for doing statistics. The main problem with R is that people underestimate how different it is and thus don't care to learn practices for writig robust R code.

Re: One Year with R

#38
post #3

For my use case, R is absolutely terrible compared to some for profit statistical package / language. Using R feel like using an outdated, complicated and messy tool. But guess what: it's free.

What for profit statistical package feels better? SAS literally has 8 character name limits in places. The data input command is literally called CARDS. It feels ancient. Minitab and SPSS aren't much better in syntax with regards to scripting which is important for reporoducability.

Re: One Year with R

#39

I love R more than any other language I have ever used. Perhaps more than any piece of software I've ever used. All of these points are valid, and yes, it's messy, and if you try to write the same type of code that you would in Python, it will frustrate you. And yet.. it somehow works. It makes data analysis and statistical modelling a pleasure. It somehow gives off a sense of lightness, and makes it easy to investig…

The main issue I've had is speed. As soon as you have problems that can't be vectorized, models that take 30 hours to run in R take 30 minutes in python.

Mind giving an example ? The only time I faced this was due to an autoregressive model, which was super easy to delegate to c++.

I've been working with Python for the last year and appreciate how much it helps with general IT problems, but I would still stick to R for statistical/data analysis.

Re: One Year with R

#40
post #8

Earlier quoted context omitted.

> For my use case, R is absolutely terrible compared to some for profit statistical package / language. Which one? I've switched most of my work over to Julia, but I'd much rather use R or Python than Stata or SPSS.

I don't understand the use case for SPSS. My local university is training their neuroscience researchers on it, which seems so odd in 2022 with Julia or python sitting right there.

Have been using SPSS decades and I think it is a good statistical tool for those who do not want to do programming much. It gives me something Iu can easily explain to and teacher other statistical users (e.g. hand in many papers with some regression analysis in it and team members who have no programming experience and do NOT want to learn much other than absolutely minimum and necessary; they are social scientists and that is it). I knew R, python, SPSS, SIR/DBMS and most of SAS all can do this. Frankly only SPSS they can use. And I believe they can use it after I am not in the picture anymore still. That is the use case of SPSS. There are more people in that hole than your think.
Post reply on HN