compact_intseq
base
read in full
Not a class a package author writes, but what R stores when a vector can be described instead of listed. A compact sequence keeps a start, a length and a step. A deferred string keeps the vector it will be converted from, and a wrapper keeps the thing it wraps plus what is known about it. All travel the same way and all expand on being changed.
Stored asan integer vector
Built asA recipe instead of the cells
Read
lengthtypemeanmediancol_mincol_maxn_missing_total
Date
base
read in full 31 in the corpus
A calendar day, stored as the number of days since 1970. Arithmetic on it is arithmetic on that number, which is why subtracting two of them gives a difftime measured in days.
Built asThe same run, read differently
Read
typemeanmediancol_mincol_maxlengthn_uniquen_missing_total
difftime
base
read in full
An elapsed time with its unit attached. The unit is chosen when the difference is taken, so the same interval can arrive as days here and as hours in the next column.
Built asThe same run, read differently
Read
unitstypemeancol_mincol_maxlengthn_missing_total
Duration
lubridate
read in full
A length of time in seconds exactly, with no calendar in it. The counterpart to Period, and the difference between them is the whole of why both exist.
Built asThe same run, read differently
Read
lengthtypemeancol_mincol_max
factor
base
read in full 125 in the corpus
A vector of codes with a level for each. The codes are what is stored. The levels give them meaning and fix the order they sort and plot in. Profiled by the same reader that profiles a factor column, so a factor stored on its own carries everything one inside a table does.
Built asThe same run, read differently
Read
levelsn_levelslevel_countsn_uniquetypelengthn_missing_total
hms
hms
read in full
A time of day, stored as seconds since midnight with a units attribute. It is a difftime underneath, which is why it prints as a duration.
Built asThe same run, read differently
Read
unitstypemeancol_mincol_maxlengthn_missing_total
IDate
data.table
read in full
A Date stored as an integer rather than a double. Same meaning, half the memory, and it sorts and subtracts identically, which is why data.table uses it by default when reading dates.
Built asThe same run, read differently
Read
typemeanmediancol_mincol_maxlength
ordered
base
read in full 2 in the corpus
A factor whose levels are ranked, so a comparison between two of them means something. The ranking is the declared order of the levels, which is stored separately from the counts.
Built asThe same run, read differently
Read
levelsn_levelslevel_countsis_orderedn_uniquetypen_missing_total
POSIXct
base
read in full 8 in the corpus
An instant, stored as seconds since 1970 with a time zone attached. The zone is not decoration. The same number prints as two different local times without it.
Built asThe same run, read differently
Read
typetzmeanmediancol_mincol_maxlengthn_missing_total
units
units
read in full
A numeric vector that knows what it measures. Arithmetic on it converts and checks units, so adding metres to seconds is an error rather than a number.
Built asThe same run, read differently
Read
unitstypemeanmediancol_mincol_maxn_missing_total
vector
base
read in full 4,403 in the corpus
A bare atomic vector with no class attribute: numeric, integer, character, logical, complex or raw. It profiles through the same reader as a column of a table, so a character vector reports its distinct count and its shortest and longest strings, and a logical its true, false and missing counts. The type is reported rather than the class, because there is no class to report.
Built asA run of cells
Read
typelengthn_uniquen_missing_totalmin_ncharmax_ncharn_truen_falsemeanmediancol_mincol_max
blob
blob
partly read 1 in the corpus
A vector of binary blobs, one raw vector per element. What a database driver returns for a BLOB column, and what R has no other natural type for.
Built asA list that need not line up
Read
lengthelement_lenstype
Not readeach element is a raw vector whose bytes are not kept, so there is a length and no content
haven_labelled
haven
partly read 2 in the corpus
A vector of codes with labels attached, which is how SPSS, Stata and SAS represent a categorical. R would use a factor. This keeps the original codes so a round trip is possible.
Built asThe same run, read differently
Read
typemeanmediancol_mincol_maxlengthn_missing_total
Not readthe value labels are not read, so a column of codes has no key to what the codes mean
integer64
bit64
partly read
A 64 bit integer, which base R does not have. The bits are carried in a double, so anything reading it without bit64 sees meaningless floating point numbers.
Built asThe same run, read differently
Read
lengthtypemeann_missing_total
Not readstored as doubles with a class attribute, so the values are summarised as the doubles they are bit for bit rather than as the integers they represent
Interval
lubridate
partly read 3 in the corpus
A span with a start and an end rather than only a length, so it knows which stretch of time it covers.
Built asThe same run, read differently
Read
lengthtype
Not readthe start instant is an attribute and is not read, so an interval reports a span with no position in time
ITime
data.table
partly read
A time of day as seconds since midnight, held as an integer. The companion to IDate.
Built asThe same run, read differently
Read
typelengthmeancol_mincol_max
Not readread as the integer count of seconds it is stored as, so a time of day prints as a number
Period
lubridate
partly read
A length of time in calendar units, where a month is a month whatever its length. Adding one to a date lands on the same day of the next month rather than a fixed number of seconds later.
Built asParallel runs under one name
Read
lengthtype
Not readthe month, day and year components are separate attributes and are not combined, so the period is not rendered
POSIXlt
base
partly read
A timestamp broken into its parts as a list of parallel vectors, named the way R names them: sec, min, hour, mday, mon, year and so on. POSIXct is the same instant as one number, and is what almost everything stores.
Built asParallel runs under one name
Read
element_namestypelengthn_missing_total
Not readread as the eleven-element list it is stored as, so its length reports the fields rather than the timestamps
Surv
survival
partly read 2 in the corpus
A survival outcome, carried as one column of a data frame and physically a matrix of times and status codes. Without its type attribute the numbers are just numbers, and the censoring is what gives them meaning.
Built asA run with a dim
Read
dimdimnamestypemeanmediancol_mincol_maxn_missing_total
Not readthe type attribute saying whether the times are right censored, interval censored or a counting process is not read; a multi-state object's states attribute is likewise unread
vctrs_rcrd
vctrs
partly read
A vector whose elements have several parts, stored as parallel fields under one class. clock's calendar types and ivs's intervals are built on it, and read without vctrs it looks like a short list.
Built asParallel runs under one name
Read
element_nameselement_lenslengthelements
Not reada record vector is a list of parallel fields and reads as that list, so its length is the number of fields rather than the number of records