R/qr_version.R
qr_version.Rd
Determine the required version Returns a list with the version, error correction level and mode. The bit string encodes mode and the length of the input string.
qr_version(x, ecl = c("L", "M", "Q", "H"))
the input string
the required error correction level.
Available options are "L"
(7%), "M"
(15%), "Q"
(25%) and "H"
(30%).
Defaults to "L"
.
qr_version("HELLO WORLD")
#> $version
#> [1] 1
#>
#> $ecl
#> [1] "L"
#>
#> $mode
#> [1] "Alphanumeric"
#>
#> $bit_string
#> 0010000001011
qr_version("hello world", ecl = "H")
#> $version
#> [1] 2
#>
#> $ecl
#> [1] "H"
#>
#> $mode
#> [1] "Byte"
#>
#> $bit_string
#> 010000001011