Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the major differences between the R and S programming languages? [closed]

Tags:

What are the differences between R and S?

like image 454
Sauron Avatar asked Jul 23 '09 05:07

Sauron


People also ask

What is are the main difference S between traditional programming languages vs R Python?

Python is more of a deep learning language and is a language for development and deployment. Codes in R need more maintenance as it is a vector-based language. Python is more robust and easy to maintain. R offers multiple packages for accomplishing one task, while Python has a few packages for a single task.

How is R better than other languages?

R simplifies quality plotting and graphing. R libraries such as ggplot2 and plotly advocates for visually appealing and aesthetic graphs which set R apart from other programming languages.


2 Answers

The R FAQ does a decent job answering this question:

  • What are the differences between R and S?

We can regard S as a language with three current implementations or “engines”, the “old S engine” (S version 3; S-Plus 3.x and 4.x), the “new S engine” (S version 4; S-Plus 5.x and above), and R. Given this understanding, asking for “the differences between R and S” really amounts to asking for the specifics of the R implementation of the S language, i.e., the difference between the R and S engines.

[...]

like image 95
ars Avatar answered Apr 03 '23 08:04

ars


If you're talking about working from the command prompt or with scripts, the biggest difference will be package support. The most fundamental difference is the underscore assignment operator. In S y_2 is the same as y=2. In R y_2 is just a string/object. When I moved from S to R several years ago (was on S 5.x at the time) I found most of my functions and scripts ran pretty well by just replacing the underscores with <-. An example for me was the spatial stats implementation. At the time the S spatial stats package was about 8 years old with no updating. R had several packages available and most of the new research seemed to be implemented for R (free goes a long way with academics).

S-Plus has a huge GUI front-end and ostensibly that's what the several grand price tag is for. However my S experience is several versions old now.

like image 43
kpierce8 Avatar answered Apr 03 '23 07:04

kpierce8