A curated list of amazingly awesome R vector classes, and the packages that provide them.
Please read CONTRIBUTING if you wish to add a new vector class.
Classes provided by base R.
character- Strings:"a"numeric- Floating-point numbers:1.234567integer- 32-bit integers:1numeric_version- Software versions:'1.23.456'POSIXct- Calendar time with time zone, stored as days since epoch:2020-03-03 09:16:17 CETPOSIXlt- Calendar time with time zone, stored as record of components:2020-03-03 09:16:17 CET
Classes that wrap numbers.
Classes that wrap dates and times.
aweek- Weeks that start on any day of the week:2020-W10-2date_xx- Years, year-quarter, year-month and year-week:2020-Q1hms- Time of day:12:34:56yr- Year-based time scales:4.2 ka
Classes that wrap complex objects.
blob- Binary Large OBjects:blob[42 B]labelled- Labelled vectors:<Labelled double> 3with labelsmixed_units- Numbers with different units:1 [m], 2 [kg]phone- Phone numbers parsed with Google's libphonenumber for formatting and further processing:# Parsed phone numbers: 5 total, 4 successfully parsedterm- Labels for values in numeric objects:beta[1,2]
Classes related to computing
ip_address- IP address:192.168.0.1ip_interface- IP interface:192.168.0.1/24ip_network- IP network:192.168.0.0/24
Classes implemented by packages for their own use
tokenlist- List of tokens:[3 tokens]with number of unique tokens
- Advanced R by Hadley Wickham
- vctrs: simplifies creating vector classes
- Jesse Sadler, vctrs: Creating custom vector classes with the vctrs package at RStudio::conf2020 with the companion tutorial debvctrs
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International license.
