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

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.

主站蜘蛛池模板: 隆德县| 谢通门县| 嘉善县| 雷山县| 江陵县| 长丰县| 诸暨市| 天柱县| 吴桥县| 黔江区| 偃师市| 中卫市| 铁力市| 桂林市| 石楼县| 深州市| 无为县| 隆昌县| 临城县| 全南县| 永德县| 余庆县| 花莲市| 汽车| 广西| 英吉沙县| 宁德市| 达孜县| 庄浪县| 辽源市| 高淳县| 凤阳县| 邯郸县| 东城区| 化隆| 南江县| 昭平县| 陆河县| 吉安县| 泾阳县| 阳朔县|