## ---- test-linearAlgebra-vechnames
lapply(
X = seq_len(3),
FUN = function(k,
text) {
text <- paste(
text,
k
)
message(text)
varnames <- seq_len(k)
testthat::test_that(
text,
{
testthat::expect_equal(
.vech(
outer(
X = varnames,
Y = varnames,
FUN = function(x, y) {
paste0(x, ".", y)
}
)
),
vechnames(varnames)
)
}
)
testthat::test_that(
text,
{
testthat::expect_equal(
.vech(
outer(
X = varnames,
Y = varnames,
FUN = function(x, y) {
paste0(x, ".", y)
}
)
),
names(
vech(
toeplitz((k:1) / k),
names = TRUE
)
)
)
}
)
},
text = "test-linearAlgebra-vechnames"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.