R编程是什么?
什么是R编程? shì R ?)
R是当今最受欢迎的统计编程脚本语言之一。自2010年代初以来,对R程序员的需求不断增长,R仍然是数据科学家中首选的编程语言。
近年来,R语言也开始应用于深度学习领域,这对许多统计学家来说非常有帮助,使得他们能够轻松地在各自领域进行深度学习,使得R成为当前蓬勃发展的人工智能领域中不可或缺的一部分。
推荐阅读:Python数据科学库
R编程语言的历史
R的前身是一种名为S(S代表统计)的语言,由AT&T开发用于统计计算。AT&T在1976年开始开发S,作为其内部统计分析环境的一部分,该环境最初是以FORTRAN库的形式实现的。
S 的幕后人物是约翰·查默斯。独字名 S 受当时广泛使用的 C 语言编程启发。
R是由Ross Ihaka和Ross Gentleman在新西兰奥克兰大学于1992年开始的项目中开发的。第一个版本在1995年发布,第一个稳定测试版于2000年问世。
R最初与S有所不同,它在现有的S功能之上添加了词法作用域的语义。R这个单字母的名称同样受到S的启发,它取自于两位作者名字的首字母。
R是在GNU公共许可证下开发的,并且可以公开分发。
S语言后来由TIBCO公司从AT&T手中购买,通过添加一些高级分析功能和面向对象编程能力,发展成了S-plus。
R 编程的特点
- Platform independent – Runs on several computing platforms such as Windows, Linux, and Mac OS.
- Portable – Easy to run on mobiles, tablets and gaming consoles.
- Frequent releases – Resulting in timely bug fixes and less frustration.
- Superior Graphics – Compatibility with aesthetic graphical libraries like ggplot2 and plotly ensures publication-quality graphics visualizations.
- Versatility – Hundreds of packages for specific purposes being developed and improved on a daily basis by the developer community.
R语言的优势
相比于S和S-plus,R仍然是更为主流和广泛使用的统计编程语言,并且这是理所当然的,原因在于它具备诸多优点。
- R was developed with the intention of building an open-source implementation of S, therefore R is and will always remain an open-source software.
- R has thousands of professional scientists and statisticians constantly using and improving it.
- R is compatible with Windows, Mac, and Linux. It runs almost anywhere and doesn’t consume much space.
- In addition to the statistical processing features, R can also be used as a general programming language with functional programming and object-oriented programming capabilities.
- R has far more superior visualization features compared to several commercial products, due to the involvement of ggplot2 and plotly.
- The graphics provided by R are more beautiful and preferred by experts all over the world.
- R isn’t an innately graphical user interface based environment. It only takes commands as inputs, making it easy to save commands as scripts and port across domains.
- R sessions are efficiently managed. Your command history and data are saved between sessions, therefore you can pick up where you left with little hassle.
- R has a rich and responsive online developer community.
在R的局限性
尽管R具有许多优点,它被认为是最不被反感的编程语言。然而,与其他任何语言一样,R远非完美。在开始学习R之前,牢记其缺点将会很有帮助。
- Steep Learning Curve: R is not an easy language to get started with. Beginners find it hard to get their feet wet due to the command-line interface. IDEs like RStudio will help overcome this limitation to some extent. Additionally, the wide array of packages can be confusing to beginners.
- Hungry for Physical Memory: Unlike its strong contender Python, R stores all its data in the physical memory. This makes it hard to handle huge datasets. But fortunately, Hadoop integration for R has improved a lot these days, alleviating the issue to a large extent.
- Slower execution: R would need a lot of optimization before your code can run as fast as it does on MATLAB or Python. A strong understanding of the internal working of objects is needed when designing a program to avoid slow execution.
请选择中国vc支持
中国
实现DID
交换/协作
智能合约
世界各地的链上发行和交易
得到显著利益的最佳企业加速器
在CRAN项目(全称为Comprehensive R Archive Network)中,R可以作为一个命令行界面环境来使用。然而,作为一个初学者,你将会通过使用一个集成开发环境(IDE)更快地学习,而R有许多可供选择的IDE。
- RStudio : The most popular IDE for getting started with R. There are both desktop and enterprise versions available.
- StatET : An Eclipse-based IDE for R programming and package building.
- ESS-R project: Supports several statistical packages in addition to R, such as S-Plus, SAS, Stata and OpenBUGS/JAGS.