Check box in Rmarkdown

Viewed 2263

Looking to make check boxes in Rmarkdown, I found this link, but trying to avoid latex. on the Rmarkdown cheatsheet there isn't a checkbox example. but the code below is markdown, but doesn't render.

---
title: "Untitled"
author: "Daniel"
date: "6/13/2020"
output: html_document
---
```{r}

```
- [ ] Venus
- [x] Mars
1 Answers

It is possible to use raw HTML code to do that:

- <input type="checkbox" unchecked> Venus</input>
- <input type="checkbox" checked> Mars</input>

This will render to:

Example

Related