I started learning R and Python at university. Both were used during the period. When an option to choose on among the two programming language for a data science project is given, I would choose Python over R.
R – is a program developed for statistical analysis and comes with great visualisation support and dashboards like R shiny, where as Python is fully developed web and software development language now being used for data analytical purpose (thanks to its extensive data science libraries).
Even though I learned both of these programming language during the same period, for me it was always Python easy to learn. According to me, machine learning newbies should always try to learn Python at first place. Easiness was everywhere from learning, typing, the simple user interface of Jupyter notebook and Google Colab. Syntax was as easy as typing the English language but to put some braces and inverted commas like print(“Hello World”). R on the other hand, was easy at basics operations but its complexity increased drastically when I went to complex programming which was a bit overwhelming at times.
Availability of libraries and algorithms was a boon when we were doing a market basket analysis project for a client. Almost everything which we think of the possibilities to do the analytics were available online in terms of libraries, tutorials and even YouTube videos.
The community of Python users is larger compared with any other programming language. It may be primary due to the evolution of Python from being a Christmas holidays hobby programming project of Guido van Rossum during December 1989 to a great programming tool in early 2000s, then additional of data analytics libraries made it the favourite programming language of data scientists. Now its managed by Python Software Foundation and they release the new updates. Python 4 is expected to be released by 2023. It good to have the community bigger as you would find all the answers for your issues with the coding online. Stackoverflow, reddit, github repositories are true saviours. It also makes it easy not to learn the complex coding by heart but to learn how to Google your needs.
Due to the availability to online notebooks like Google Colab, I find Python more mobile. It makes it easy to code on your iPhones and iPads on the go which are considered to be modern necessity. Due to free GPU provided by Google Colab, I use it most of the time when it comes to deep learning projects. It also makes it easy to share your work, ask feedback and help from your fellow teammates with its share feature. Dark mode and kitty modes of Google colab are my favourite features of Google Colab.
But R is superior when it comes to its speed during many iterations. R produces excellent visualisations compared with the Python with its in-build libraries. R has also added its Keras libraries recently which makes it well equipped for deep learning.
So, if you are new to Data science field and in a dilemma to choose one of the two, I would greatly suggest learning Python at first place. Once you become confident in Python, learn R. You would definitely find it easier and similar to Python. According to me, knowing R along with Python at first place is necessary as it adds another skill to your resume and improves employability.