- R Programming By Example
- Omar Trejo Navarro
- 236字
- 2021-07-02 21:30:42
Putting it all together into high-quality code
Now that we have the fundamentals about analyzing data with descriptive statistics, we're going to improve our code's structure and flexibility by breaking it up into functions. Even though this is common knowledge among efficient programmers, it's not a common practice among data analysts. Many data analysts would simply paste the code we have developed all together, as-is, into a single file, and run it every time they wanted to perform the analysis. We won't be adding new features to the analysis. All we'll do is reorder code into functions to encapsulate their inner-workings and communicate intention with function names (this substantially reduces the need for comments).
We'll focus on producing high-quality code that is easy to read, reuse, modify, and fix (in case of bugs). The way we actually do it is a matter of style, and different ways of arranging code are fit for different contexts. The method we'll work with here is one that has served me well for a variety of situations, but it may not be the best for yours. If it doesn't suit your needs, feel free to change it. Whichever style you prefer, making an investment in creating a habit of constantly producing high-quality code will make you a more efficient programmer in the long run, and a point will come where you will not want to program inefficiently any more.
- Microsoft Power BI Quick Start Guide
- 機器學習及應(yīng)用(在線實驗+在線自測)
- 樂高創(chuàng)意機器人教程(中級 下冊 10~16歲) (青少年iCAN+創(chuàng)新創(chuàng)意實踐指導叢書)
- 數(shù)據(jù)挖掘方法及天體光譜挖掘技術(shù)
- 大數(shù)據(jù)平臺異常檢測分析系統(tǒng)的若干關(guān)鍵技術(shù)研究
- 大數(shù)據(jù)技術(shù)與應(yīng)用
- 網(wǎng)絡(luò)化分布式系統(tǒng)預測控制
- 激光選區(qū)熔化3D打印技術(shù)
- Mastering MongoDB 3.x
- 運動控制系統(tǒng)(第2版)
- 玩機器人 學單片機
- Deep Learning Essentials
- 從實踐中學嵌入式Linux操作系統(tǒng)
- Modern Big Data Processing with Hadoop
- 圖像傳感器應(yīng)用技術(shù)