Skip to content

Instantly share code, notes, and snippets.

@crsh
Last active August 29, 2015 14:06
Show Gist options
  • Save crsh/a666a961b002fcfecc53 to your computer and use it in GitHub Desktop.
Save crsh/a666a961b002fcfecc53 to your computer and use it in GitHub Desktop.
Embedding data into RMarkdown documents
# Embedding data into RMarkdown documents
<details>
<summary>Show data</summary>
```{r}
cars <- structure(list(speed = c(4, 4, 7, 7, 8, 9, 10, 10, 10, 11, 11,
12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 16,
16, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 20, 20, 20, 20, 20,
22, 23, 24, 24, 24, 24, 25), dist = c(2, 10, 4, 22, 16, 10, 18,
26, 34, 17, 28, 14, 20, 24, 28, 26, 34, 34, 46, 26, 36, 60, 80,
20, 26, 54, 32, 40, 32, 40, 50, 42, 56, 76, 84, 36, 46, 68, 32,
48, 52, 56, 64, 66, 54, 70, 92, 93, 120, 85)), .Names = c("speed",
"dist"), row.names = c(NA, -50L), class = "data.frame")
```
</details>
```{r}
summary(cars)
```
@crsh
Copy link
Author

crsh commented Sep 13, 2014

Only drawback: It's not supported by all browsers, yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment