qrcode_gen: QRcode generator

Description Usage Arguments Value Examples

View source: R/qrcode_gen.R

Description

Create QRcode in R. Capable to generate all variant of QRcode, version 1 to 40 and Error correct level of "L","M","Q" and " H". Not all reader in market can support all QRcode version, qrcode_gen() has a software limit to version 10 which is tested working in most reader.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
qrcode_gen(
  dataString,
  ErrorCorrectionLevel = "L",
  dataOutput = FALSE,
  plotQRcode = TRUE,
  wColor = "White",
  bColor = "black",
  mask = 1,
  softLimitFlag = TRUE
)

Arguments

dataString

input string for the QRcode.

ErrorCorrectionLevel

Error Correction Level. The available options are "L", "M", "Q" and "H". Default value as "L".

dataOutput

option to export data as matrix. Default value is FALSE.

plotQRcode

option to plot QRcode. Default value is TRUE.

wColor

color of the white module(white squre) in QRcode. Default value "white".

bColor

color of the black module(black squre) in QRcode. Default value "black".

mask

mask for QRcode to increase decodability. Available values are 0 to 7.

softLimitFlag

flag to limit the QRcode version to 10. Default value TRUE.

Value

A matrix that represent the QRcode. 1 as black module and 0 as white module.

Examples

1
2
3
4
 qrcode_gen("www.r-project.org")

 #User may change the color of the module
 qrcode_gen("www.r-project.org", bColor = "Green3")

qrcode documentation built on July 2, 2021, 5:06 p.m.