10 Doing more with your data with extensions

 

This chapter covers

  • Writing your own packages
  • Analyzing your code (benchmarking/profiling)
  • Making code more efficient
  • Figuring out where to go next
  • Communicating your work

If all has gone well, you now have the tools you need to take command of your data and extract insights from it in a reproducible, readable, and understandable way. That’s not the end of the line for learning about R, though. As you gain more experience, you’ll find certain parts that you wish were better. Maybe your code runs too slowly to be useful, maybe you need more rigor in the functions you’ve written, or maybe you’ve made something awesome and want to share it with the world. This chapter covers how to do these things should you decide you want to. There’s a lot to learn, so I’ll cover the basics and hopefully give you enough of a head start to track down the remaining pieces of your particular puzzle.

10.1 Writing your own packages

Whether you have a single function or a whole directory full of files containing functions, it’s often a good idea to solidify these into a package. Not only does this allow some formal testing of your function(s), but it also provides a very good mechanism for documentation, and at the end of it you have something you can more easily share with others.

10.1.1 Creating a minimal package

10.1.2 Documentation

10.2 Analyzing your package

10.2.1 Unit testing

10.2.2 Profiling

10.3 What to do next?

10.3.1 Regression

10.3.2 Clustering

10.3.3 Working with maps

10.3.4 Interacting with APIs

10.3.5 Sharing your package

10.4 More resources

Terminology

Summary

sitemap