awesome-vctrs
awesome-vctrs copied to clipboard
A curated list of amazingly awesome R vector classes
Awesome VectoRs
A curated list of amazingly awesome R vector classes, and the packages that provide them.
Contributing
Please read CONTRIBUTING if you wish to add a new vector class.
Table of Contents
-
Awesome VectoRs
- Contributing
- Table of Contents
- Base
- Numbers
- Date and time
- Strings
- Compound
- Computing
- Geospatial
- Internal
-
Resources
- Books
- Repositories
- Blog posts
- Talks
- License
Base
Classes provided by base R.
-
character
- Strings:"a"
-
hexmode
- Hexadecimal numbers:2A
-
integer
- 32-bit integers:1
-
numeric
- Floating-point numbers:1.234567
-
numeric_version
- Software versions:'1.23.456'
-
octmode
- Octal numbers:52
-
POSIXct
- Calendar time with time zone, stored as days since epoch:2020-03-03 09:16:17 CET
-
POSIXlt
- Calendar time with time zone, stored as record of components:2020-03-03 09:16:17 CET
Numbers
Classes that wrap numbers.
-
bigfloat
- High precision numbers:0.33333333333333333333333333333333333333333333333333
-
biginteger
- Arbitrary precision integers:25852016738884976640000
-
errors
- Numbers with uncertainty:1 ± 0.3
-
fracture
- Fractions:1/3
-
nombre
- Number names:one
-
num
- Numbers with formatting:1.00
-
quantities
- Numbers with units and uncertainty:1 ± 0.3 [m/s]
-
units
- Numbers with units:1 [m/s]
Date and time
Classes that wrap dates and times.
-
aweek
- Weeks that start on any day of the week:2020-W10-2
-
calendar
- Alternative representations of calendar dates, such as year-quarter-day or year-month-weekday:2019-02-Sun[2]
-
date_y
,date_yq
,date_ym
,date_yw
- Years, year-quarter, year-month and year-week:2020-Q1
-
hms
- Time of day:12:34:56
-
term
- Represent ordinal academic semesters:20164
-
time_point
- Variable precision points in time, with and without time zones:"2020-02-01 02:03:04.000005"
-
yearquarter
,yearmonth
,yearweek
- Year-quarter, year-month and year-week:2021 Oct
-
yr
- Year-based time scales:4.2 ka
Strings
Classes that wrap character strings.
-
char
- Strings with minimum width and custom abbreviation:abc…xyz
Compound
Classes that wrap complex objects.
-
blob
- Binary Large OBjects:blob[42 B]
-
doi
- Digital Object Identifiers (DOIs):10.1000/1
-
intrval
- Relational operators for intervals:x %[]% c(a, b)
-
iv
- Interval vectors:[2019-01-05, 2019-05-06) [2019-01-06, 2019-05-22)
-
labelled
- Labelled vectors:<Labelled double> 3
with labels -
mixed_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 parsed
-
term
- Labels for values in numeric objects:beta[1,2]
Computing
Classes related to computing
-
ip_address
- IP address:192.168.0.1
-
ip_interface
- IP interface:192.168.0.1/24
-
ip_network
- IP network:192.168.0.0/24
Geospatial
Classes related to geospatial
-
crc
- Circle:[1 2, r = 0.5]
-
geos_geometry
- Geometry vector as GEOS external pointers:<POINT (0 1)>
-
rct
- Rectangle:[1 2 3 4]
-
s2_geography
,s2_cell
- Geometry vector of points on the sphere as external pointers to S2 objects, S2 cell IDs as 64-bit integers:<POINT (0 1)>
-
sfc
- Geometry vector in spatial data frames:POINT (0 1)
-
wkb
- Well-known binary geometry:<POINT (0 1)>
-
wkt
- Well-known text geometry:POINT (0 1)
-
xy
- Points:(1 4)
Internal
Classes implemented by packages for their own use
-
tokenlist
- List of tokens:[3 tokens]
with number of unique tokens
Resources
Books
- Advanced R by Hadley Wickham
Repositories
- vctrs: simplifies creating vector classes
Blog posts
- Earo Wang: A practical guide to vctrs-powered S3 programming: using vctrs for turtle graphics
Talks
- Jesse Sadler, vctrs: Creating custom vector classes with the vctrs package at RStudio::conf2020 with the companion tutorial debvctrs
License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International license.