Daniel_j_iii
Daniel_j_iii

Reputation: 3242

Check box in Rmarkdown

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

Upvotes: 5

Views: 4434

Answers (1)

J_F
J_F

Reputation: 10352

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

Upvotes: 8

Related Questions