16  Creating QR Codes for Presentations

16.1 Creating QR codes with R

There is a package called qrcode which generates nice little codes which are persistent and free. After installing the package, use the following code, where destination is the URL you wish the code to direct to.

library(qrcode)

destination <- "https://jjcurtin.quarto.pub/precision-mental-health-for-substance-use-disorders-7561"


qr <- qr_code(destination, ecl = c("L", "M", "Q", "H"))

plot(qr)

Then save the plot as an image file.