##' Unit tests (Am I supposed to put all of these in one file?)
##'
context("Circular subsetting a single sequence")
test.str <- str_c(letters, collapse = "")
# Subsetting from the beginning of the sequence
expect_equal(
circular_cut(seq = test.str, len = 5, start.pos = 1),
"abcde"
)
# Subsetting across the end of the sequence
expect_equal(
circular_cut(seq = test.str, len = 5, start.pos = 23),
"wxyza"
)
# Subsetting from the very end of the sequence
expect_equal(
circular_cut(seq = test.str, len = 5, start.pos = 26),
"zabcd"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.