vctrs: Creating custom vector classes with the vctrs package - Jesse Sadler

January 30, 2020 Jesse Sadler
The base R types of vectors enable the representation of an amazingly wide array of data types. There is so much you can do with R. However, there may be times when your data does not fit into one of the base types and/or you want to add metadata to vectors. vctrs is a developer-focused package that provides a clear path for creating your own S3-vector class, while ensuring that the classes you build integrate into user expectations for how vectors work in R. This presentation will discuss the why and how of using vctrs through the example of debkeepr, a package for integrating historical non-decimal currencies such as pounds, shillings, and pence into R. The presentation will provide a step-by-step process for developing various types of vectors and thinking through the design process of how vectors of different classes should work together.

About the Author

Jesse Sadler

I am a historian of early modern Europe and currently a lecturer at Loyola Marymount University in Los Angeles. My research investigates the significance of sibling relationships and inheritance in the development of early modern capitalism. I have been using R for approximately two and a half years to analyze and visualize historical data. I am the author of two R packages that should be on CRAN shortly. The opencage package geocodes locations and is written in concert with Maëlle Salmon and Daniel Possenriede, among others. I am also writing a package called debkeepr that integrates non-decimal currencies into R through the basis provided by the vctrs package.

Follow on Twitter Visit Website More Content by Jesse Sadler
Previous Video
Asynchronous programming in R - Winston Chang
Asynchronous programming in R - Winston Chang

Writing regular R code is straightforward: you tell R to do something, it does it, and then it returns cont...

Next Video
Simplified Data Quality Monitoring of Dynamic Longitudinal Data: A Functional Programming Approach - Jacqueline Gutman
Simplified Data Quality Monitoring of Dynamic Longitudinal Data: A Functional Programming Approach - Jacqueline Gutman

Ensuring the quality of data we deliver to customers or provide as inputs to models is often one of the mos...