bdm | R Documentation |
Obtain Complexity of Longer Strings than allowed by ACSS via the Block Decomposition Method.
bdm(
string,
blocksize = 10,
alphabet = 9,
delta = blocksize,
print_blocks = FALSE
)
string |
|
blocksize |
size of blocks/substrings/windows to be created from |
alphabet |
|
delta |
distance between two blocks. Default is |
print_blocks |
logical. Should blocks be printed to the console? Default is |
acss("SSOOXFXFOXXOXOXFFXXXSOTTOFFFXX") # too long
bdm("SSOOXFXFOXXOXOXFFXXXSOTTOFFFXX") # default blocksize is 10
bdm("SSOOXFXFOXXOXOXFFXXXSOTTOFFFXX", blocksize = 5)
bdm("SSOOXFXFOXXOXOXFFXXXSOTTOFFFXX", blocksize = 7) # gives warning
bdm("SSOOXFXFOXXOXOXFFXXXSOTTOFFFXX", blocksize = 7, delta = 1)
multi <- c(
"SSOOXFXFOXXOXOXFFXXXSOTTOFFFXX",
"SSODXFXDOXXOXOXFFXRRSORTOXDOXX",
"DXXXXRRXXXSSOOOXOFFFOOOOORFODD"
)
bdm(multi)
bdm(multi, delta = 1)
bdm(multi, blocksize = 5)
# binary bdm should give 57.5664 in this case
bdm("010101010101010101", alphabet = 2, blocksize = 12, delta = 1)
# show all blocks:
bdm("010101010101010101", alphabet = 2, blocksize = 12, delta = 1, print_blocks = TRUE)
# uses a block of size less than 12:
bdm("010101010101010101", alphabet = 2, blocksize = 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.