Nothing
test_that("fromJSON Array, row major", {
# test high dimensional arrays
lapply(2:5, function(n) {
object <- array(1:prod(n), dim = 1:n)
newobject <- fromJSON(toJSON(object))
expect_equal(object, newobject)
})
# adding some flat dimensions
lapply(1:5, function(n) {
object <- array(1:prod(n), dim = c(1:n, 1))
newobject <- fromJSON(toJSON(object))
expect_equal(object, newobject)
})
})
test_that("fromJSON Array, column major", {
# test high dimensional arrays
lapply(2:5, function(n) {
object <- array(1:prod(n), dim = 1:n)
newobject <- fromJSON(toJSON(object, matrix = "columnmajor"), columnmajor = TRUE)
expect_equal(object, newobject)
})
# adding some flat dimensions
lapply(1:5, function(n) {
object <- array(1:prod(n), dim = c(1:n, 1))
newobject <- fromJSON(toJSON(object, matrix = "columnmajor"), columnmajor = TRUE)
expect_equal(object, newobject)
})
})
test_that("fromJSON Array, character strings", {
# test high dimensional arrays
lapply(2:5, function(n) {
object <- array(paste("cell", 1:prod(n)), dim = 1:n)
newobject <- fromJSON(toJSON(object, matrix = "columnmajor"), columnmajor = TRUE)
expect_equal(object, newobject)
})
# adding some flat dimensions
lapply(1:5, function(n) {
object <- array(paste("cell", 1:prod(n)), dim = c(1:n, 1))
newobject <- fromJSON(toJSON(object, matrix = "columnmajor"), columnmajor = TRUE)
expect_equal(object, newobject)
})
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.