baRcodeR 0.1.2 release - new linear barcodes

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.