ropensci / baRcodeR

Labeling, tracking, and organizing samples with 2D barcodes
https://docs.ropensci.org/baRcodeR
GNU General Public License v3.0
36 stars 12 forks source link

qrCodeSpec$ECL : $ operator is invalid for atomic vectors #1

Closed yihanwu closed 6 years ago

yihanwu commented 6 years ago

Weird problem in qrCode.

The easiest solution is to use manually load qrCode with

dev.off()
library(qrcode)

to close off the connection already created, load the qrcode library and then run the create_PDF code again.

yihanwu commented 6 years ago

The problem is that qrcode_gen references qrVersionInfo which then loads a data object called "qrCodeSpec." But qrCodeSpec cannot be exported automatically out of the qrcode package. (@importFrom qrcode qrCodeSpec) does not work.

yihanwu commented 6 years ago

Also, in qrVersionInfo, qrCodeSpec is called by

 qrCodeSpec <- ""
 data(qrCodeSpec, envir = environment())

So cannot even do anything other than loading qrcode directly.

yihanwu commented 6 years ago

Solved by using qrcode as a depends rather than an import.