Skip to content

Commit fd305f7

Browse files
committed
Build README
1 parent 650ff78 commit fd305f7

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ To create a blob, use `blob()`, `new_blob()` or `as_blob()`:
4545
library(blob)
4646

4747
x1 <- charToRaw("Good morning")
48-
x2 <- as.raw(c(0x48, 0x65, 0x6c, 0x6c, 0x6f))
48+
x2 <- as.raw(c(0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef))
4949

5050
new_blob(list(x1, x2))
5151
#> <blob[2]>

index.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
2+
<!-- badges: start -->
3+
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
4+
[![rcc](https://github.com/tidyverse/blob/workflows/rcc/badge.svg)](https://github.com/tidyverse/blob/actions)
5+
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/blob)](https://cran.r-project.org/package=blob)
6+
[![Coverage Status](https://codecov.io/gh/tidyverse/blob/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tidyverse/blob)
7+
<!-- badges: end -->
8+
9+
<!-- README.md is generated from README.Rmd. Please edit that file -->
10+
11+
12+
13+
# blob <a href="https://blob.tidyverse.org"><img src="man/figures/logo.png" align="right" height="122" alt="blob website" /></a>
14+
15+
## Overview
16+
17+
The goal of blob is to provide a simple S3 class to represent a vector of binary objects, aka blobs. The `blob` class is a lightweight wrapper around a list of raw vectors, suitable for inclusion in a data frame.
18+
19+
In most cases you will not need to use this package explicitly: it will be used transparently by packages that need to load BLOB columns from databases or binary file formats.
20+
21+
## Installation
22+
23+
```r
24+
# The easiest way to get blob is to install the whole tidyverse:
25+
install.packages("tidyverse")
26+
27+
# Alternatively, install just blob:
28+
install.packages("blob")
29+
30+
# Or the the development version from GitHub:
31+
# install.packages("pak")
32+
pak::pak("tidyverse/blob")
33+
```
34+
35+
## Example
36+
37+
To create a blob, use `blob()`, `new_blob()` or `as_blob()`:
38+
39+
40+
``` r
41+
library(blob)
42+
43+
x1 <- charToRaw("Good morning")
44+
x2 <- as.raw(c(0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef))
45+
46+
new_blob(list(x1, x2))
47+
#> <blob[2]>
48+
#> [1] blob[12 B] blob[5 B]
49+
blob(x1, x2)
50+
#> <blob[2]>
51+
#> [1] blob[12 B] blob[5 B]
52+
53+
as_blob(c("Good morning", "Good evening"))
54+
#> <blob[2]>
55+
#> [1] blob[12 B] blob[12 B]
56+
```
57+

0 commit comments

Comments
 (0)