<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/r-or-python-python-or-r-the-ongoing-debate/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://tomaztsql.wordpress.com/2018/01/28/r-or-python-python-or-r-the-ongoing-debate/"> R – TomazTsql</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>On every SQL community event, where there could be a cluster of sessions dedicated to BI or analytics, I would have people asking me, “which one would you recommend?” or “which one I  prefer?”</p>
<p><img data-orig-file="https://tomaztsql.files.wordpress.com/2018/01/2018-01-28-15_15_13-edit-post-e280b9-tomaztsql-e28094-wordpress-com.png?w=456" data-orig-size="461,234" data-medium-file="https://tomaztsql.files.wordpress.com/2018/01/2018-01-28-15_15_13-edit-post-e280b9-tomaztsql-e28094-wordpress-com.png?w=456?w=300" data-attachment-id="4943" data-image-meta="{" data-image-description="" src="https://tomaztsql.files.wordpress.com/2018/01/2018-01-28-15_15_13-edit-post-e280b9-tomaztsql-e28094-wordpress-com.png?w=456" data-permalink="https://tomaztsql.wordpress.com/2018/01/28/r-or-python-python-or-r-the-ongoing-debate/2018-01-28-15_15_13-edit-post-tomaztsql-wordpress-com/#main" data-large-file="https://tomaztsql.files.wordpress.com/2018/01/2018-01-28-15_15_13-edit-post-e280b9-tomaztsql-e28094-wordpress-com.png?w=456?w=461" alt="2018-01-28 15_15_13-Edit Post ‹ TomazTsql — WordPress.com" data-image-title="2018-01-28 15_15_13-Edit Post ‹ TomazTsql — WordPress.com" sizes="(max-width: 461px) 100vw, 461px" data-comments-opened="1" class="wp-image-4943" data-recalc-dims="1"></p>
<p>So, questions about recommendation and preferences are in my opinion the hardest one. And not that I would know my preferences but because you are inadvertently creating someone’s taste or preferences by imposing yours. And expressing taste through someone else taste is even harder.</p>
<p>My initial reaction is a counter-question, why are you asking this? Simply because my curiosity goes beyond the question of preferring A over B, respectively.  And most of the time, the answer I get is, “because everyone is asking this question” or “because someone said this and the other said that”. In none of the cases, and I mean literally in none, I got the response (the one I would love to get) back like “we are running this algorithm and there are issues…” or “this library suits us better…”. So the community is mainly focused on asking themselves which one is better, instead of asking, can R / Python do the job. And I can assure you, that both can do the job! Period.</p>
<p>Image I ask you, would you prefer Apple iPhone over Samsung Galaxy, respectively? Or if I would ask you, would you prefer BMW over Audi, respectively? In all the cases, both phones or both cars will get the job done. So will Python or R, R or Python. So instead of asking which one I prefer, ask your self, which one suits my environment better? If your background is more statistics and less programming, take R, if you are more into programming and less into statistics, take Python; in both cases you will have faster time to accomplish results with your preferred language. If you ask me, can I do gradient boosting or ANOVA or MDS in Python or in R, the answer will be yes, you can do both in any of the languages.</p>
<p>Important questions are therefore the one that will give you fast results, easier adaptation and adoption, will give a better fit into your environment and will have less impact on your daily tasks.</p>
<p>Some might say, R is a child’s play language, while Python is a real programming language. Or some might say, Python is so complex and you have to program everything, whereas in R, everything is ready. And so on and on. All these allegations have some truth, but to fully understand them, I guess one needs to understand the background of the people saying this.  Obviously, Python in comparison to R is more general purpose scripting and programming language, therefore the number of packages is 10x higher, when compared to R. And both come with variety of different packages, giving users a specific functions, classes and procedures to execute their results. R on the other hand has had it’s moment in past couple of years and the community grew rapidly, whereas Python community is in it’s steady phase.</p>
<p>When you are deciding which one to select, here are some questions to be answered:</p>
<ul>
<li>how big my corporate environment and how many end users will I have</li>
<li>who is the end user and how will the end user handle the results</li>
<li>what is current general knowledge with the language</li>
<li>which statistical and predictive algorithms will the company be using</li>
<li>would there be a need to parallel and distributed on-prem computations</li>
<li>if needed, do we need to connect (or copy/paste) the code to the cloud</li>
<li>how fast can the company adopt the language and the amount of effort needed</li>
<li>which language would fit easier with existing BI stack and visualization tools</li>
<li>how is your data centralized and silosd and which data sources are you using</li>
<li>governance and providence issues</li>
<li>installation, distribution of the core engine and packages</li>
<li>selection and the costs of IDE and GUI</li>
<li>corporate support and SLA</li>
<li>possibility to connect to different data sources</li>
<li>released dates of the most useful packages</li>
<li>community support</li>
<li>third party tools and additional programs for easier usage of the language</li>
<li>total cost of using the language once completely in place</li>
<li>asses the risk of using an GNU/open source software</li>
</ul>
<p>After answering these questions, I implore you to do the stress and load tests against your datasets and databases to see, what perform better.</p>
<p>All in all, both languages, when doing statistical and predictive analysis, also have couple of annoyances that should also be addressed:</p>
<ul>
<li>memory limitations (unless spilling to disk)</li>
<li>language specifics (e.g.: R is case-sensitive, Python is indent-sensitive and both will annoy you)</li>
<li>parallel and distributed computations (CPU utilization, multi-threading)</li>
<li>multi-OS running environment</li>
<li>cost of GUI/IDE</li>
<li>engine and package dependencies and versioning</li>
<li>and others</li>
</ul>
<p>So next time, when you ask yourself or overhear the conversation in the community, which one is better (bigger, faster, stable,…), start asking the questions on your needs and effort to adopt it. Otherwise, I always add, learn both. It does not hurt to learn and use both (for at least the statistical and predictive purposes).</p>
<p>All best!</p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://tomaztsql.wordpress.com/2018/01/28/r-or-python-python-or-r-the-ongoing-debate/"> R – TomazTsql</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/AK6_niO5Tfw" height="1"></a></div>