世界充满了为各种目的而设计的编程语言。其中一些可能看起来很新,但它们已经存在了几十年,其中之一就是被称为R的编程语言。近年来,R 在现场爆炸式增长,成为最常用的语言之一,而且这种情况可能会持续多年。
R 编程语言
R 是一种编程语言和软件环境,被统计学家和数据挖掘者用于统计计算和图形。在进行直接深入研究 R 编程的步骤之前,您必须首先了解该语言是什么以及它的功能。
- 什么是R编程语言
- R 包
- 什么是 RStudio
让我们更详细地看一下。
1]什么是R编程语言
对于那些可能想知道的人,编程语言是由Ross Ihaka和Robert Gentleman在 1993年创建的。此外(Furthermore),请注意大多数 R 库是使用 R 编写的,但对于其他人来说,C、C++ 和Fortran是首选。
从我们收集到的信息来看,R 背后的想法都是关于统计计算的。它主要由数据挖掘(data miners)者、统计学家、数据分析人员等使用。简而言之(Simply),如果您想快速高效地生成数据,那么 R 就是您的最佳选择。
截至今年2 月(February),R 已被评为全球第 13位最常用的编程语言。在此之前,它排在前 10 位,因此我们可以得出结论,R 在世界范围内的使用频率很高。事实上,Airbnb、Uber、Facebook和Google等公司都以不同的方式利用了这种语言。
因此,就目前而言,R 主要用于统计推断、数据分析(data analysis)和机器学习算法。
阅读(Read):低级和高级编程语言之间的区别(Difference between Low-level and High-level Programming languages)。
2] R包
为了充分利用 R,用户需要利用它带来的所有软件包。截至目前,大约有 12,000 个包,每个包都存储在CRAN中。现在,如果您不知道,CRAN既是免费的又是开源的。可以选择下载其中任何一个来执行统计任务。
其中一些包包括 ggplot2、tidyr、tidyverse、XML、data.table、scales、dplyr 等。
从官方网站(official website)下载R。
3] 什么是 R Studio
如果您想更轻松地使用 R,那么最好的选择是下载RStudio。这个程序是 R 的集成开发环境,根据我们的经验,它运行良好。事实上,R 和RStudio都是同一事物的不同版本。
从官方网站(official website)下载 RStudio 。
您会看到,如果您不熟悉使用 R,那么学习的最佳选择就是利用RStudio提供的功能。事实上,如果可以的话,我们将列出您应该使用RStudio(RStudio)而不是 R的主要原因。
- 全文编辑器
- 停靠窗口
- 自动完成
- 更好的用户界面
1]全文编辑器
R 的常规版本的主要缺点之一是它没有功能齐全的文本编辑器。如果你想使用语法高亮等等,那么你就不走运了。在尝试学习一门新的编程语言时,拥有一个好的文本编辑器会带来不同的世界。
2]停靠窗口
有时我们不知道包含我们所有出色代码的文本文件到哪里去了。这是因为 R 不停靠窗口,但RStudio可以。所有相关窗口都停靠在一起,与使用常规版本的 R 相比,这使得它们更容易找到。
3]自动完成
是的,RStudio可以让用户选择自动完成文本。只需(Just)按 Tab 键,该工具将尝试修复您的错误。我们说尝试是因为它并不总是做出正确的决定,所以在继续前进之前请记住这一点。
4]更好的用户界面
让我们诚实一点。R 的常规版本具有过时的 UI,但这对于已经知道自己在做什么的高级用户来说很好。更不用说,简约的外观确保了出色的性能,因此无需投资强大的计算机。
尽管如此,我们仍然更喜欢RStudio,因为它在右上角的面板中展示了完整的对象列表。这是一个有用的功能,我们怀疑即使是高级用户也会想要使用它。
What is the R programming language and why you should use RStudio
The world is filled with programming languages designed for variouѕ purposes. Some of them might aррear new, but they’ve been around for decades, and one of such is the programming language known as R. In recent years, R has exploded on the scene to become one of the most used, and things could stay like this for multiple years to come.
R programming language
R is a programming language & software environment is used by statisticians and data miners for statistical computing & graphics. Before making the steps to dig directly into programming with R, you must first understand what the language is, and its capabilities.
- What is R programming language
- R packages
- What is RStudio
Let’s look at this in more detail.
1] What is R programming language
For those who might be wondering, the programming language was created by Ross Ihaka and Robert Gentleman in 1993. Furthermore, note that most of the R libraries are written using R, but for others, C, C++, and Fortran are preferred.
From what we’ve gathered, the idea behind R is all about statistical computing. It is primarily used by data miners, statisticians, data analysis, and more. Simply put, if you want to generate data quickly and efficiently, then R is the way to go.
As of February, of this year, R has been rated as the 13th most used programming language in the world. Before that, it was in the top 10, so we can come to the conclusion that R is used quite often around the world. In fact, companies such as Airbnb, Uber, Facebook, and Google all take advantage of this language in different ways.
So, as it stands, R is primarily used for statistical inference, data analysis, and machine learning algorithms.
Read: Difference between Low-level and High-level Programming languages.
2] R packages
To get the most out of R, the user is required to take advantage of all the packages it brings to the table. As of right now, there are around 12,000 packages, and each is stored in CRAN. Now, if you weren’t aware, CRAN is both free and open source. The option is there to download any one of them to perform statistical tasks.
Some of these packages include the likes of ggplot2, tidyr, tidyverse, XML, data.table, scales, dplyr, and much more.
Download R from the official website.
3] What is R Studio
If you want to have an easier time using R, then the best option is to download RStudio. With this program is an integrated development environment for R, and it works quite well from our experience. In truth, both R and RStudio are different versions of the same thing.
Download RStudio from the official website.
You see, if you are new to using R, then your best option to learn is to take advantage of what RStudio has to offer. In fact, we are going to list the top reasons why you should use RStudio instead of R if you can.
- Full-text editor
- Dock windows
- Autocomplete
- Much better user interface
1] Full-text editor
One of the major downsides of the regular version of R is the fact that it doesn’t have a full-featured text editor. If you want to use syntax highlighting, and much more, then you’re out of luck. Having a good text editor makes for a world of difference when attempting to learn a new programming language.
2] Dock windows
There are times when we have no idea where the text file containing all our awesome code has gone. That’s because R doesn’t dock windows, but RStudio does. All relevant windows are docked together, which makes them easier to find when compared to using the regular version of R.
3] Autocomplete
Yes, RStudio has the option for the user to autocomplete texts. Just press the tab key and the tool will try to fix your mistakes. We say try because it doesn’t always make the right decisions, so keep that in mind before moving forward.
4] Much better user interface
Let’s be honest about this. The regular version of R has a dated UI, but that is fine for advanced users who already know what they’re doing. Not to mention, the minimalistic look ensures snappy performance, so no need to invest in a beefy computer.
Despite all of that, we still prefer RStudio because it showcases a full list of objects in the panel located at the upper-right. It’s a useful feature, and we suspect that even the advanced users will want to make use of it.