test_that("ohcl_data", {
comp <- head(index_components("DAX"), 5)
for (i in comp$ISIN) {
dat <- ohcl(i)
expect_s3_class(dat, "zoo", exact = FALSE)
expect_equal(colnames(dat), c("open", "high", "low", "close"))
expect_true(all(apply(dat, 1, min) == dat[, "low"]))
expect_true(all(apply(dat, 1, max) == dat[, "high"]))
}
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.