A QR code is a two-dimensional barcode developed by the Denso Wave company.
Usage
qr_code(x, ecl = c("L", "M", "Q", "H"))
See also
Other qr:
coordinates()
,
generate_svg()
,
plot.qr_code()
,
print.qr_code()
,
qr_event()
,
qr_location()
,
qr_sepa()
,
qr_wifi()
Examples
qr_code("https://www.r-project.org")
#>
#> ▗▄▄▄▗▗▗▖▗▗▄▄▄
#> ▐▗▄▐▗█▀▛▞▐▗▄▐
#> ▐▐█▐▐▀▟▜▄▐▐█▐
#> ▐▄▄▟▗▐▚▜▐▐▄▄▟
#> ▗▄▖▗▗▐▟▗▘▖▗▄▗
#> ▀▌▗▟▟▟▄▝▘▌ ▘
#> ▐▜▘▙▙█▗█▟█▄▜▄
#> ▞▖▚▘▄▛▄▀▞▜▗▞
#> ▝▐█▚█▜▘▄█▙█▄▟
#> ▗▄▄▄▝█ ▄▐▗▐▐▟
#> ▐▗▄▐ ▄▝▐▐▄▟▖▗
#> ▐▐█▐▐▀▌▌▀▟▐▜▛
#> ▐▄▄▟▐ ▘█▘▀▟▟▄
#>
#>
#>
#> use plot() for a better quality image
qr <- qr_code("https://cran.r-project.org/package=qrcode", ecl = "M")
qr
#>
#> ▗▄▄▄▗▗ ▗▗▄▖▗▄▄▄
#> ▐▗▄▐▝▜▞▛▐▝▟▐▗▄▐
#> ▐▐█▐▝▄▘▜█▘▞▐▐█▐
#> ▐▄▄▟▗▐▐▗▗▜▜▐▄▄▟
#> ▗▗▖▄▞▞▜▗▞█▛▗ ▖▄
#> ▗█▟▄▞▐█▌▗ ▀█▟▗▞
#> ▝▟▀▗ █▙█▖▖▀ ▀▄▝
#> ▟▙▛▜▝▟▀▙▌▜▖▐█
#> ▐▄▌▙█▞▚▖▝ ▙▀▟▖▌
#> ▗▐▜▄▜▝▙▚▙▌▐▗▘▜▘
#> ▞▙▙▙▌ ▖▗█▚▙▙▟
#> ▗▄▄▄▐▗▐▌▐▖▟▗▐▛▛
#> ▐▗▄▐▝▜▄▗▀▖▐▄▟▚█
#> ▐▐█▐▐▚▛▜▀▘▖▌▞▚▐
#> ▐▄▄▟▗▜▀▖ ▗█▘▌▘▌
#>
#>
#>
#> use plot() for a better quality image
plot(qr)
# the qr_code object is a logical matrix
str(qr)
#> 'qr_code' logi [1:35, 1:35] FALSE FALSE FALSE FALSE FALSE FALSE ...
#> - attr(*, "string")= chr "https://cran.r-project.org/package=qrcode"
#> - attr(*, "ecl")= chr "M"
qr[1:10, 1:10]
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
#> [1,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#> [2,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#> [3,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#> [4,] FALSE FALSE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
#> [5,] FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE
#> [6,] FALSE FALSE FALSE TRUE FALSE TRUE TRUE TRUE FALSE TRUE
#> [7,] FALSE FALSE FALSE TRUE FALSE TRUE TRUE TRUE FALSE TRUE
#> [8,] FALSE FALSE FALSE TRUE FALSE TRUE TRUE TRUE FALSE TRUE
#> [9,] FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE
#> [10,] FALSE FALSE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE