knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

qrencoder : Make QR codes in R

There is another package on CRAN -- qrcode -- that is not C-backed.

Quick Response codes (QR codes) are a type of matrix bar code and can be used to authenticate transactions, provide access to multi-factor authentication services and enable general data transfer in an image. QR codes use four standardized encoding modes (numeric, alphanumeric, byte/binary, and kanji) to efficiently store data. Matrix barcode generation is performed efficiently in C via the included libqrencode library created by Kentaro Fukuchi.

The following functions are implemented:

Installation

devtools::install_github("hrbrmstr/qrencoder")
options(width=120)

Usage

library(qrencoder)

# current verison
packageVersion("qrencoder")

url <- "http://rud.is/b"
head(qrencode(url))

head(qrencode_df(url))

qrencode_png(url)

qrencode_raster(url)

par(mar=c(0,0,0,0))
image(qrencode_raster("http://rud.is/b"), 
      asp=1, col=c("white", "black"), axes=FALSE, 
      xlab="", ylab="")

SVG

cat(qrencode_svg(url))

Test Results

library(qrencoder)
library(testthat)

date()

test_dir("tests/")

Code of Conduct

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.



hrbrmstr/qrencoder documentation built on May 17, 2019, 5:12 p.m.