blob: Construct a blob object

Description Usage Arguments See Also Examples

View source: R/blob.R

Description

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.

Usage

1
2
3
4
5
6
7
8
9

Arguments

...

Individual raw vectors

x

A list of raw vectors, or other object to coerce

See Also

as.blob() for the legacy interface for specifying casts.

Examples

1
2
3
4
5
6
7
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"))

Example output

[1] blob[12 B] blob[ 5 B]
[1] blob[12 B] blob[ 5 B]
[1] blob[12 B] blob[12 B]

blob documentation built on July 9, 2019, 5:03 p.m.