4 ms·
I'm a data scientist without a formal background in programming. Can someone please explain why implementing math functions in C/D is different than doing it in
by bvrstvr 6y ago
I'm a data scientist without a formal background in programming. Can someone please explain why implementing math functions in C/D is different than doing it in R?
For example, I would assume that creating a mean function using numbers and operators would be language-agnostic.
- fizixer 6y ago- R: the mean function is already created - C: You will create the mean function It's the difference between using a calculator and knowing how to multiply two 5 digit numbers with pen and paper. You might say, "Oh but we can do that in R". Well, if you start doing that one function at a time, very soon you find yourself with R grinding to a halt.
- cinntaile 6y agoIf you want to you can recreate the mean function in R as well, so why would you choose to do it in another language if your goal is to learn R?
- dunefox 6y agoNo good reason for C/D/... other than the wanting to learn the particular language. Otherwise, use R or Julia to stay in the scientific domain.
- disgruntledphd2 6y agoGo look at the R source for mean sometime (you want the base function). It's not as simple as one might imagine.
- iamcreasy 6y agoFor optimal performance you need to control few things simultaneous, such as memory allocation/access. R do now allow you to access memory but C does.