Convert Files to and from Binary Objects (BLOBs)

Converts files to and from flobs. A flob is a file that was read into binary in integer-mode as little endian, saved as the single element of a named list (where the name is the extension of the original file) and then serialized before being coerced into a blob. Flobs are useful for writing and reading files to and from databases.


lifecycle Travis buildstatus AppVeyor buildstatus Coveragestatus License:MIT CRANstatus

Introduction

flobr is an R package to convert files to and from flobs.

A flob is a file that was read into binary in integer-mode as little endian, saved as the single element of a named list (where the name is the extension of the original file) and then serialized before being coerced into a blob.

Flobs are useful for writing and reading files to and from databases.

Utilisation

library(flobr)
 
path <- system.file("extdata", "flobr.pdf", package = "flobr")
 
flob <- flob(path)
flob
#> /Library/Frameworks/R.framework/Versions/3.5/Resources/library/flobr/extdata/flobr.pdf 
#>                                                                        blob[133.84 kB]
flob_ext(flob)
#> [1] "pdf"
 
new_path <- tempfile(fileext = ".pdf")
 
unflob(flob, new_path)
 
all.equal(flob, flob(new_path), check.attributes = FALSE)
#> [1] TRUE

Installation

To install the latest development version from GitHub

# install.packages("devtools")
devtools::install_github("poissonconsulting/err")
devtools::install_github("poissonconsulting/checkr")
devtools::install_github("poissonconsulting/flobr")

To install the latest development version from the Poisson drat repository

# install.packages("drat")
drat::addRepo("poissonconsulting")
install.packages("flobr")

Citation

Warning in citation(package = "flobr"): no date field in DESCRIPTION file
of package 'flobr'
Warning in citation(package = "flobr"): could not determine year for
'flobr' from package DESCRIPTION file

To cite package 'flobr' in publications use:

  Joe Thorley (NA). flobr: Convert Files to and from Binary
  Objects (BLOBs). R package version 0.1.0.
  https://github.com/poissonconsulting/flobr

A BibTeX entry for LaTeX users is

  @Manual{,
    title = {flobr: Convert Files to and from Binary Objects (BLOBs)},
    author = {Joe Thorley},
    note = {R package version 0.1.0},
    url = {https://github.com/poissonconsulting/flobr},
  }

Creditation

The blob package.

The hex was designed by The Forest.

Contribution

Please report any issues.

Pull requests are always welcome.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

News

flobr 0.1.0

  • Added flob_obj

flobr 0.0.1

  • Added a NEWS.md file to track changes to the package.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("flobr")

0.1.0 by Joe Thorley, 5 months ago


https://github.com/poissonconsulting/flobr


Report a bug at https://github.com/poissonconsulting/flobr/issues


Browse source code at https://github.com/cran/flobr


Authors: Joe Thorley [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports err, checkr, blob, tools

Suggests covr, spelling, testthat


See at CRAN