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

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.

主站蜘蛛池模板: 鄄城县| 忻城县| 金秀| 平顶山市| 玛纳斯县| 三穗县| 平顶山市| 沁水县| 洛川县| 禹州市| 兴化市| 吉木乃县| 博兴县| 朝阳市| 陇西县| 潜山县| 黄平县| 合作市| 闵行区| 墨脱县| 阿尔山市| 临沂市| 南康市| 格尔木市| 襄汾县| 淄博市| 麻栗坡县| 昆明市| 乐亭县| 镇江市| 上杭县| 昌平区| 朝阳区| 灵丘县| 黑龙江省| 铁力市| 台东县| 宝鸡市| 湄潭县| 汉阴县| 昭平县|