Home >Backend Development >Python Tutorial >Which is easier to get started with r or python?

Which is easier to get started with r or python?

(*-*)浩
(*-*)浩Original
2019-07-05 13:37:095324browse

If you only want to learn one language, python is still recommended.

Which is easier to get started with r or python?

Judging from the situation of people around me, many people who have learned a lot of R eventually choose to learn another Python, including myself. But people who are very good at Python have never heard of people coming to learn R. (Recommended learning: Python video tutorial)

I actually learned python for crawlers, and then I learned python data analysis by the way. What impresses me the most is python's neatness, uniformity and elegant syntax. For example, various machine learning algorithms are used in exactly the same way in Python, and training, prediction and testing are all done in the same way, which greatly reduces the cost of learning. At this point, R seems very messy. Although there are many and complete R packages, there are too many repetitions and different calling methods, so the learning cost rises sharply.

However, R also has advantages that python cannot match. To sum up, R is more convenient.

First, drawing.

Python's drawings are basically based on the matplotlib library, and many other libraries are related to this. It is undeniable that the drawing flexibility of this library is very powerful, that is, you can adjust it wherever you want, but it is very troublesome to write a lot of code every time you draw a simple graphic.

Second, the call of the data analysis function.

Because data science is just a branch of python, the data types of data science are not python’s built-in types, but are placed in several libraries. The libraries must be loaded every time they are used. The function used is more troublesome in my opinion.

To sum up, the design of Python syntax is more standardized, and users can realize their own ideas more freely, but it will help you realize less things than R. Because it is more flexible, I recommend this if you are only learning one language. Otherwise, if you are learning R language, you will sometimes feel that it is not enough and feel uncomfortable.

To use an analogy, python is like giving you a very good fishing rod. You can catch any fish you want (but you have to catch it yourself). R is like giving you A fishing rod that is not that easy to use also comes with endless carp and crucian carp. You can only eat these two kinds of fish, but if you want to eat grass carp, you will have to put in a lot of effort to eat it. In order to prevent misleading, add the comparison of C language. C language is a fishing rod and you have to make it yourself.

For more Python related technical articles, please visit the Python Tutorial column to learn!

The above is the detailed content of Which is easier to get started with r or python?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn