3
$\begingroup$

I sometimes see job descriptions where R is posted as analytical tool while others mention R as programming language.

What is the difference between programming in R and performing analysis in R?

UPDATE as of 10/17/2020:

lately, new elements popping in job descriptions made me realize that my old question was too vague. Now I see jobs where "programming languages (e.g.Python) are required as well as statistical packages (e.g. R)".

In many cases, the job actually requires scripts in either language.

So it may be that the difference between scripting and programming eludes some of the job posters.

I have read somewhere a while ago that - regardless of language - scripting associates with specificity while programming with generality.

In data analysis the distinction can be clear: scripting requires access to specific example of dataset structure and specified outcome while programming is more relaxed in this respect; a program is supposed to cover a wide variety of structures, eventually using the experience gathered through scripted analyses. The options for outcome follow logically.

$\endgroup$
2
  • 9
    $\begingroup$ That there is a huge difference is evident in the fact there are plenty of statisticians who perform analyses effectively in R but can't program at all and even more computer programmers who can program in R but have little idea of how to do statistical analysis. But what the job descriptions actually mean is anybody's guess. $\endgroup$
    – whuber
    Commented Dec 13, 2016 at 17:36
  • $\begingroup$ "analysis" (in the context of R users) typically means "statistical analysis" whereas "programming" (esp. for more general-purpose languages) could mean web, frontend, backend, database, visualization, networking, security etc. You can get away with this assumption in R because it and its programming audience are oriented to statistics and on average have a very high level of education both in general and statistical literacy in particular... but this generalization is not true of (say) PHP, JavaScript, SQL. $\endgroup$
    – smci
    Commented Oct 12, 2020 at 19:39

3 Answers 3

1
$\begingroup$

There really is not much of a difference. Or it is a difference that does not matter much.

One could say that programming is writing a set of steps to do some process, while analysis is actually doing the process. So strictly, you could say you are programming R when you design a function or procedure that can be used on many data sets, while analysis would be using such functions on a given data set.

That said, the boundary is not hard and trying to make it hard is generally not useful. I suspect that most people saying stuff like this are really trying to draw a distinction between using a language to analyze data (like in R) or using a graphical user interface that just lists all of the options for any analysis. For better and for worse, both of these are ways of analyzing data, although only the former (coding) is really useful for building new procedures for general use.

$\endgroup$
3
  • 1
    $\begingroup$ While I thank everyone for their insightful answers, I tend to agree with you, Doctorambient, as I am unable to completely separate programming from analysis in R. $\endgroup$ Commented Dec 13, 2016 at 17:49
  • 2
    $\begingroup$ The point @whuber makes in the comment above is something that should also be included. There are a lot of programmers who cannot analyze data (I work with them!) and analysts that can't program (I work with them, too). I think that point is really important, and I missed that aspect of things. Thanks! $\endgroup$ Commented Dec 19, 2016 at 16:14
  • $\begingroup$ I consider that what one is and can or cannot do is just beside the point of this discussion. $\endgroup$ Commented Dec 5, 2021 at 17:29
3
$\begingroup$

"analysis" (in the context of R users) typically means "statistical analysis" whereas "programming" (esp. for more general-purpose languages) could mean web, frontend, backend, database, visualization, networking, security etc.

You can get away with this assumption in R only because it and its programming audience are oriented to statistics and on average have a very high level of education both in general and statistical literacy in particular... but you can't get away with this (since the generalization is not true of) with most other languages: e.g. PHP, JavaScript, SQL, VBA, C#... even MATLAB/Octave users will tend to be knowledgeable about linear algebra and probably vector calculus, but not necessarily of statistics (beyond basics like "what is standard deviation? normal distribution?").

$\endgroup$
6
  • $\begingroup$ Nowadays R can do more than just "statistical programming" and most R users are knowledgeable in advanced calculus and linear algebra. Statistical theory requires it. $\endgroup$ Commented Oct 14, 2020 at 1:56
  • $\begingroup$ @DragosBandur: that's not what I said, you're completely misconstruing what I wrote. I said it's a reasonable assumption that the average R user is statistically literate, whereas that's not a reasonable assumption of the average user in other languages. I know lots of MATLAB/Octave users. I've even taught data science classes to some. $\endgroup$
    – smci
    Commented Oct 14, 2020 at 4:02
  • $\begingroup$ @ smci "Misconstruing" would imply a deliberate action and I resent that! I have just responded to your comment. I see that you consider the users you have met as being in a quite representative number when there is unlikely you would know that for sure. There could be programmers without mathematical background using languages that are not focused on data analysis. Nobody contests that. This wasn't the point of this conversation. $\endgroup$ Commented Oct 15, 2020 at 5:10
  • 1
    $\begingroup$ @DragosBandur: No, misconstrue doesn't imply 'deliberately'. I clearly didn't speculate on your intent. I simply pointed out you'd misinterpreted it, which you had. $\endgroup$
    – smci
    Commented Oct 16, 2020 at 7:24
  • 2
    $\begingroup$ smci, Dragos: Please don't let this escalate. Reading these comments with the assumption you are both attempting to engage respectfully and constructively, I cannot see that any statements worthy of resentment were made. Let's keep it that way. To limit the possibility of misinterpretation, let's focus on the substance of this thread and avoid using language that suggests (even unintentionally) how people might be thinking, reasoning, or reacting. $\endgroup$
    – whuber
    Commented Oct 16, 2020 at 13:57
2
$\begingroup$

R is both, its a statistical tool but there is no drop and click interface you have to use the R programming language to perform the analysis you want to do. I would assume performing analysis in R and R programming are synonymous unless the context states otherwise: for example, if someone wants a R package built they are looking for someone who can program in R rather than an analyst per se.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.