baRcodeR 0.1.2 release – new linear barcodes
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
install.packages("baRcodeR")
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.
R-bloggers.com 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.