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.
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.