官术网_书友最值得收藏!

  • R Programming By Example
  • Omar Trejo Navarro
  • 355字
  • 2021-07-02 21:30:34

What R is not good for

No programming language or system is perfect. R certainly has a number of drawbacks, the most common being that it can be painfully slow (when not used correctly). Keep in mind that R is essentially based on 40-year-old technology, going back to the original S system developed at Bell Labs. Therefore, several of its imperfections come from the fact that it was not built in anticipation for the data age we live in now. When R was born, disk and RAM were very expensive and the internet was just getting started. Notions of large-scale data analysis and high-performance computing were rare.

Fast-forward to the present, hardware cost is just a fraction of what it used to be, computing power is available online for pennies, and everyone is interested in collecting and analyzing data at large scale. This surge in data analysis has brought to the forefront two of R's fundamental limitations, the fact that it's single-threaded and memory-bound. These two characteristics drastically slow it down. Furthermore, R is an interpreted dynamically typed language, which can make it even slower. And finally, R has object immutability and various ways to implement object-oriented programming, both of which can make it hard for people, specially those coming from other languages, to write high-quality code if they don't know how to deal with them. You should know that all of the characteristics mentioned in this paragraph are addressed in Chapter 9, Implementing an Efficient Simple Moving Average.

A double-edged sword in R, is that most of its users do not think of themselves as programmers, and are more concerned with results than with process (which is not necessarily a bad thing). This means that much of the R code you can find online is written without regard for elegance, speed, or readability, since most R users do not revise their code to address these shortcomings. This permeates into code that is patchy and not rigorously tested, which in turn produces many edge cases that you must take into account when using low-quality packages. You will do well to keep this in mind.

主站蜘蛛池模板: 同德县| 始兴县| 乾安县| 双流县| 扎囊县| 彩票| 邯郸市| 和林格尔县| 安化县| 加查县| 平江县| 铅山县| 原阳县| 蓬莱市| 长垣县| 昌图县| 永登县| 绥江县| 贺州市| 莆田市| 鄂托克前旗| 聂荣县| 大竹县| 湖南省| 调兵山市| 上林县| 二连浩特市| 太仆寺旗| 芒康县| 四子王旗| 三明市| 张掖市| 长兴县| 石楼县| 青神县| 德令哈市| 张家界市| 志丹县| 平遥县| 衡东县| 鄯善县|