R as in Ridiculous .. The first impression for a software engineer

R as in Ridiculous .. The first impression for a software engineer

In the last week, I had the chance to attend a Bootcamp for three days in Dubai about Data Science with R. Although being a software developer for more than six years. It was the first time to deal with R programming face to face. Surprisingly, during the class, I got a shock after shock about some matters that supposed to be logical to any Software Engineer who used to switch between languages smoothly without feeling confused. Here are some observations summarise my first impression of R.

‘c’ function is used to define a vector

I couldn’t recognise the reason beyond that. Maybe because c is the third letter in the word vector. On the other hand, the other data types are completely different in their definition ways, as an example, data frames are defined using the function “data.frame”. That is why software engineers have something called “code standards”.

You should not use (x = 3) although it works

The officially used operator for assignment is “<-“ operator, however “=” operator can do what you exactly expect it to do, but they, whoever they are, highly recommend the usage of the assignment operator “<-” instead.

“.” do not have any superpowers

A syntax like “variable.name” simply represents the variable name without any other assumptions about what the “.” letter do here. One more point that relates here is that R is a functional programming language, not an object-oriented one, which may irritate some developers that used to use modern languages.

“Hello ” + “World” is a syntax error

The “+” operator can only be used in numbers, and if we want to concatenate the previous two words, we can do it using the following function

paste(‘Hello ’, ‘World’, sep='')

Arrays Start at 1

No Comment on this point ??

Further concerns

Arguments like “R does not fit in production, it’s just for academic use”, or “You have to write C code to perform your high computations” can be discussed here, but I prefer to postpone it for another discussion.

In the end, No-one can neglect that the statisticians who created the language (Ross Ihaka and Robert Gentleman) have made a great effort in their area of expertise and provided a powerful tool to perform their calculations. Anyway, I am giving myself a chance to bypass that first impression about R and hoping that Python won’t let me down afterwards.

Carlos Hiram Culebro Méndez

Data Analyst: SQL, Excel, Python, Tableau

8 个月

I think R is a great tool. I understand your point because I felt the same way when I first looked into PHP, but for me, R is very intuitive.

回复
Donald Start

Analytic Scientist

6 年

Gotta agree with finding the dot convention vexing, coming from C++/Java & VBA.

I can't agree. In my end R is working wonderful to solve my Data Science problem. We should be friend of open source!

回复
Roman Ahmed, PhD

Strategy & Technical Lead | Statistics | Econometrics | Forecasting | Test & Learn | ML & AI | Experimentation | NV1 Cleared

6 年

Typical article from someone new to R with some experience elsewhere. No language is free from limitations (including R) but whatever pointed in the article are not limitations but lack of understanding in math. If you really want to understand the philosophy behind the use of the assignment operator "<-" or indexing starting at 1 I would recommend to have a solid foundation in mathematics first. Do you understand what is the difference between X=5 vs X<-5 in maths? BTW do you know any R code will run fine if you use = instead of <-. Do you know what <<- does and why? Also check S3 and S4 class if you are interested in OOP in R. Unfortunately don't have enough time to address your all points in detail as my job is not to educate people on LinkedIn.

要查看或添加评论,请登录

ahmed Elsayed的更多文章

社区洞察

其他会员也浏览了