baRcodeR 0.1.2 release – new linear barcodes

[This article was first published on R on YIHAN WU, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

baRcodeR 0.1.2 is released on CRAN today!

Download and install by

Example linear barcode

Example linear barcode

The major feature of this release is the ability to print linear (a.k.a normal) barcodes through specifying type = "linear" in create_PDF() rather than type = "matrix" which prints the usual QR code.

The github repository is at yihanwu/baRcodeR.

Minor notes on the implementation of these linear barcodes

The linear barcodes are based on the code 128B specification (Wikipedia). All ASCII characters are allowed, and non-ASCII characters are replaced by a dash. To replace characters such as é with ASCII equivalent rather than have them be replaced, use the stringi package and functions such as stringi::stri_enc_toascii.

The barcode itself is drawn using the image function, a one-D version of the heatmap function in R using the binary string for the barcode. All graphics are produced with grid if anyone wishes to move the text to the bottom of the label rather than the top.

Also, there is no error correction included in linear barcodes and barcodes which are too small will have indistinguishable bars to barcode scanners depending on their capabilities.

To leave a comment for the author, please follow the link and comment on their blog: R on YIHAN WU. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)