16

Can QR codes be generated in R? Is there is a package that allows it?

zx8754
  • 52,746
  • 12
  • 114
  • 209
user1216772
  • 161
  • 1
  • 3

2 Answers2

16

Now on CRAN

You can use the qrencoder package - https://github.com/hrbrmstr/qrencoder - to do this. It begs the question: "Why?", though

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

hrbrmstr
  • 77,368
  • 11
  • 139
  • 205
  • 7
    *Why?* - I heard the digital currencies are the first practical usage of QR codes. See [accept payments in shiny app](http://www.r-bloggers.com/accept-payments-in-shiny-app/) – jangorecki Aug 05 '15 at 00:02
11

There's also a CRAN package called qrcode now. check this: https://cran.r-project.org/web/packages/qrcode/index.html

usage is a as simple as it gets:

library(qrcode)
qrcode_gen('www.r-project.org')
Matt Bannert
  • 27,631
  • 38
  • 141
  • 207