Nothing
test_that('plain lists display correctly', {
expect_identical(repr_html(list(1, 2)), '<ol>
\t<li>1</li>
\t<li>2</li>
</ol>
')
})
test_that('named lists display correctly', {
expect_identical(repr_html(list(a = 1, b = 2)), '<dl>
\t<dt>$a</dt>
\t\t<dd>1</dd>
\t<dt>$b</dt>
\t\t<dd>2</dd>
</dl>
')
})
test_that('lists with unknown element types don’t display', {
methods::setClass('__unknown', methods::representation(n = 'character'))
expect_identical(repr_html(list(1, methods::new('__unknown'))), NULL)
})
test_that('lists with nonexistant names work', {
expect_identical(repr_html(list(a = 0, 1)), '<dl>
\t<dt>$a</dt>
\t\t<dd>0</dd>
\t<dt>[[2]]</dt>
\t\t<dd>1</dd>
</dl>
')
})
test_that('NAs can occur in list names', {
l <- as.list(1:2)
names(l) <- c(NA, NA)
expect_identical(repr_html(l), '<dl>
\t<dt>$<NA></dt>
\t\t<dd>1</dd>
\t<dt>$<NA></dt>
\t\t<dd>2</dd>
</dl>
')
})
test_that('Lists with empty strings as names work', {
l <- structure(list(1), names = '')
expect_identical(repr_html(l), '<ol>
\t<li>1</li>
</ol>
')
})
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.