Link to home
Start Free TrialLog in
Avatar of Mike R.
Mike R.

asked on

Benefits of Python versus R

I’m refactoring someone else’s code that’s been written half in Python and half in R. The core purpose of the code is discriminate analysis. Of course, I think it would be clearly beneficial for performance if only a single language was used, and I’m trying to make an argument one way or another.

The two common areas of debate between R and Python are speed and differences in algorithms (and thus mathematical accuracy). In addition, it’s my understanding that R was chosen from the belief that the validity of the analysis would be more defensible (scientifically) if it were done in R.

So, I’d love some input on two ideas:

1.      In a (specifically) discriminate analysis environment, would R be more defensible (and why)?
2.      In a (specifically) discriminate analysis environment, in what analytical/mathematical ways is R better than Python?

I really appreciate anyone taking the time to respond to this.  

Best!
ASKER CERTIFIED SOLUTION
Avatar of d-glitch
d-glitch
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Several criteria can be used to justify the choice of a particular language:

Exigency:  If the project is incomplete, and needs to be completed soon, use the language you know best.

Authority:  If external authorities require a particular language, use it even if there is a learning curve.

Expediency:  Use a combination of languages if that gets the job done fastest.