| Title: | A Simple S3 Class for Representing Vectors of Binary Data ('BLOBS') |
|---|---|
| Description: | R's raw vector is useful for storing a single binary object. What if you want to put a vector of them in a data frame? The 'blob' package provides the blob object, a list of raw vectors, suitable for use as a column in data frame. |
| Authors: | Hadley Wickham [aut], Kirill Müller [cre], RStudio [cph, fnd] |
| Maintainer: | Kirill Müller <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.3.0.9006 |
| Built: | 2026-05-24 06:36:43 UTC |
| Source: | https://github.com/tidyverse/blob |
new_blob() is a low-level constructor that takes a list of
raw vectors.
blob() constructs a blob from individual raw vectors.
as_blob() and is_blob() are simple forwarders to vctrs::vec_cast()
and inherits(), respectively.
blob(...) new_blob(x = list()) validate_blob(x) as_blob(x) is_blob(x)blob(...) new_blob(x = list()) validate_blob(x) as_blob(x) is_blob(x)
... |
Individual raw vectors |
x |
A list of raw vectors, or other object to coerce |
as.blob() for the legacy interface for specifying casts.
x1 <- charToRaw("Good morning") x2 <- as.raw(c(0x48, 0x65, 0x6c, 0x6c, 0x6f)) new_blob(list(x1, x2)) blob(x1, x2) as.blob(c("Good morning", "Good evening"))x1 <- charToRaw("Good morning") x2 <- as.raw(c(0x48, 0x65, 0x6c, 0x6c, 0x6f)) new_blob(list(x1, x2)) blob(x1, x2) as.blob(c("Good morning", "Good evening"))
Double dispatch methods to support vctrs::vec_ptype2().
## S3 method for class 'blob' vec_ptype2(x, y, ..., x_arg = "", y_arg = "")## S3 method for class 'blob' vec_ptype2(x, y, ..., x_arg = "", y_arg = "")
x, y
|
Vector types. |
... |
These dots are for future extensions and must be empty. |
x_arg, y_arg
|
Argument names for |