0% found this document useful (0 votes)
2 views

02-Python vs R

The document discusses a comparison between Python and R, two open-source programming languages commonly used in data science. Python is a general-purpose language favored for machine learning and ease of use, while R is optimized for statistical analysis and data visualization. Each language has its advantages and disadvantages, with Python being more popular among developers and R being preferred for statistical tasks.

Uploaded by

vahid sabzevari
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

02-Python vs R

The document discusses a comparison between Python and R, two open-source programming languages commonly used in data science. Python is a general-purpose language favored for machine learning and ease of use, while R is optimized for statistical analysis and data visualization. Each language has its advantages and disadvantages, with Python being more popular among developers and R being preferred for statistical tasks.

Uploaded by

vahid sabzevari
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

‫جلسه‪ :‬دوم‬

‫موضوع‪Python vs R :‬‬
‫‪Data-Hub‬‬
‫مواردی که در این جلسه بررسی می شوند‪:‬‬
‫‪ .1‬معرفی پایتون‬
‫‪ .2‬معرفی ‪R‬‬
‫‪ .3‬مقایسه هر دو‬
Data-Hub
Python vs. R:
In many ways, the two open source languages are very similar. Free to download for
everyone, both languages are well suited for data science tasks. The main difference
is that Python is a general-purpose programming language, while R has its roots in
statistical analysis.

Tip: Once you’ve learned one programming language, it’s


typically easier to learn another one.
Data-Hub
About Python:
Python is a general-purpose, object-oriented programming language that
emphasizes code readability through its generous use of white space.
Released in 1989, Python is easy to learn and a favorite of programmers and
developers. In fact, Python is one of the most popular programming
languages in the world, just behind Java and C.

Plus, Python is particularly well suited for deploying machine learning at a


large scale. Its suite of specialized deep learning and machine learning
libraries includes tools like scikit-learn, Keras, Pytorch and TensorFlow,
which enable data scientists to develop sophisticated data models that plug
directly into a production system.
Data-Hub

Guido van Rossum (Inventor of Python) •


Data-Hub
About R :
R is an open source programming language that’s optimized for statistical
analysis and data visualization. Developed in 1992, R has a rich ecosystem
with complex data models and elegant tools for data reporting. At last count,
more than 13,000 R packages were available via the Comprehensive R
Archive Network (CRAN) for deep analytics.

Training and evaluating machine learning and deep learning algorithms(With


the help of keras)
Data-Hub
Data-Hub

Source:codeplatoon.org
Data-Hub
Data-Hub

~ 1,700,000,000 Rial
~ 140,000,000 Rial per month
Data-Hub
Data-Hub
Data-Hub
Data-Hub

Source: PayScale.com
Data-Hub

Source: flatironschool.com
Data-Hub
Usability
Coding and debugging is easy because of the simple syntax.
Statistical models can be written with only a few lines.
Data-Hub
Ecosystem
The Python Package Index (PyPi) and Anaconda are repositories of Python
software with all libraries. Users can contribute to these repositories.
Search through these sources easily with Rdocumentation. Packages are collections
of R functions, data, and compiled code.
Data-Hub
Ease of Learning
Python’s focus on readability and simplicity.
R is easier to learn when you start out, but the intricacies of advanced functionalities
makes it more difficult to develop expertise.
Data-Hub
Advantages
• Handling massive amounts of data
• Building deep learning models
• Performing non-statistical tasks, like web scraping, saving to databases, and
running workflows

• Widely considered the best tool for making beautiful graphs and visualizations.
• Great for statistical analysis.
Data-Hub
Disadvantages
• Visualizations are more convoluted in Python than in R, and results are not as eye-
pleasing or informative.
• Python doesn’t have as many libraries for data science as R.

• Finding the right packages to use in R may be time consuming.


• There are many dependencies between R libraries.
• R can be considered slow if code is written poorly.
• Not as popular as Python for deep learning and NLP.
Data-Hub
IDE
• There are many Python IDEs to choose from which drastically reduce the
overhead of organizing code, output, and notes files. Jupyter Notebooks and
Spyder are popular, and Jupyter Lab is gaining traction.
• RStudio is the most popular R IDE. It’s available in two formats: RStudio Desktop
for running locally as a regular desktop application and RStudio Server for access
via web browser while running on a remote Linux server.
Data-Hub
I also agree
• R users mainly consists of Scholars and R&D professionals while Python users
are mostly Programmers and Developers
• R is difficult to learn at the beginning while Python is Linear and smooth to learn
• R is mainly used when the data analysis tasks require standalone computing or
analysis on individual servers.
• R programming is better suited for statistical learning, with unmatched libraries
for data exploration and experimentation. Python is a better choice for machine
learning and large-scale applications, especially for data analysis within web
applications.

You might also like