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"))

Arguments

x

the input string

ecl

the required error correction level. Available options are "L" (7%), "M" (15%), "Q" (25%) and "H" (30%). Defaults to "L".

See also

Other internal: qr_encode(), qr_error(), qr_matrix(), qr_mode()

Author

Thierry Onkelinx

Examples

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