context("Test string splitting")
test_that("single strings can be split",{
result <- rope:::string_split_single("this is a string", " ")
expect_that(result, equals(c("this","is","a", "string")))
})
test_that("multiple strings can be split",{
result <- rope:::string_split_vector(c("this is a string", "this is also a string")," ")
expect_that(result[[1]], equals(c("this","is","a", "string")))
expect_that(result[[2]], equals(c("this","is","also","a", "string")))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.