-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3950d84
commit 394ad6d
Showing
5 changed files
with
256 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Generated by `rjournal_pdf_article()` using `knitr::purl()`: do not edit by hand | ||
# Please edit paper-with-errors.Rmd to modify this file | ||
|
||
## ----setup, include=FALSE----------------------------------------------------- | ||
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE) | ||
library(plotly) | ||
library(ggplot2) | ||
library(palmerpenguins) | ||
|
||
|
||
## ----penguins-alison, out.width = "100%", out.height = "30%", fig.cap = "Artwork by \\@allison\\_horst"---- | ||
knitr::include_graphics("penguins.png") | ||
|
||
|
||
## ----penguins-tab-interactive, eval = knitr::is_html_output(), layout = "l-body-outset"---- | ||
#> knitr::kable(head(penguins), format = "html", caption = "A basic table") | ||
|
||
|
||
## ----penguins-tab-static, eval = knitr::is_latex_output()--------------------- | ||
knitr::kable(head(penguins), format = "latex", caption = "A basic table") %>% | ||
kableExtra::kable_styling(font_size = 7) | ||
|
||
|
||
## ----penguins-plotly, echo = TRUE, fig.height = 5, fig.cap="A basic interactive plot made with the plotly package on palmer penguin data. Three species of penguins are plotted with bill depth on the x-axis and bill length on the y-axis. When hovering on a point, a tooltip will show the exact value of the bill depth and length for that point, along with the species name.", include=knitr::is_html_output(), eval=knitr::is_html_output()---- | ||
#> p <- penguins %>% | ||
#> ggplot(aes(x = bill_depth_mm, y = bill_length_mm, | ||
#> color = species)) + | ||
#> geom_point() | ||
#> ggplotly(p) | ||
|
||
|
||
## ----penguins-ggplot, echo = TRUE, fig.height = 5, fig.cap="A basic non-interactive plot made with the ggplot2 package on palmer penguin data. Three species of penguins are plotted with bill depth on the x-axis and bill length on the y-axis. Visit the online article to access the interactive version made with the plotly package.", include=knitr::is_latex_output(), eval=knitr::is_latex_output()---- | ||
penguins %>% | ||
ggplot(aes(x = bill_depth_mm, y = bill_length_mm, | ||
color = species)) + | ||
geom_point() | ||
|
Oops, something went wrong.