Skip to content

Commit 61c7101

Browse files
authored
Add comment about webshot being required for reprex::reprex to work (#529)
1 parent 163ea8e commit 61c7101

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
Please briefly describe your problem and what output you expect. If you have a question, please try using stackoverflow <http://stackoverflow.com> first.
22

3-
Please include a minimal reprex. The goal of a reprex is to make it as easy as possible for me to recreate your problem so that I can fix it. If you've never heard of a reprex before, start by reading <https://github.com/jennybc/reprex#what-is-a-reprex>, and follow the advice further down the page. Do NOT include session info unless it's explicitly asked for, or you've used `reprex::reprex(..., si = TRUE)` to hide it away.
3+
Please include a minimal reprex. The goal of a reprex is to make it as easy as possible for me to recreate your problem so that I can fix it. If you've never heard of a reprex before, start by reading <https://github.com/jennybc/reprex#what-is-a-reprex>, and follow the advice further down the page. Do NOT include session info unless it's explicitly asked for, or you've used `reprex::reprex(..., si = TRUE)` to hide it away. Make sure to have `webshot` installed to have `reprex` produces images of the leaflet htmlwidgets.
4+
```r
5+
# make sure webshot is installed to take pictures of htmlwidgets
6+
if (!("webshot" %in% installed.packages()[, "Package"])) {
7+
install.packages("webshot")
8+
# restart R process to fully integrate with knitr
9+
}
10+
reprex::reprex({
11+
library(leaflet)
12+
# insert reprex here
13+
leaflet() %>% addTiles()
14+
})
15+
```
416

517
Delete these instructions once you have read them.
618

@@ -9,5 +21,7 @@ Delete these instructions once you have read them.
921
Brief description of the problem
1022

1123
```r
24+
library(leaflet)
1225
# insert reprex here
26+
leaflet() %>% addTiles()
1327
```

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,19 @@ We will try to be responsive and provide feedback in case we decide not to merge
2121

2222
## Minimal reproducible example
2323

24-
Finally, please include a minimal reprex. The goal of a reprex is to make it as easy as possible for me to recreate your problem so that I can fix it. If you've never heard of a reprex before, start by reading <https://github.com/jennybc/reprex#what-is-a-reprex>, and follow the advice further down the page. Do NOT include session info unless it's explicitly asked for, or you've used `reprex::reprex(..., si = TRUE)` to hide it away.
24+
Finally, please include a minimal reprex. The goal of a reprex is to make it as easy as possible for me to recreate your problem so that I can fix it. If you've never heard of a reprex before, start by reading <https://github.com/jennybc/reprex#what-is-a-reprex>, and follow the advice further down the page. Do NOT include session info unless it's explicitly asked for, or you've used `reprex::reprex(..., si = TRUE)` to hide it away. Make sure to have `webshot` installed to have `reprex` produces images of the leaflet htmlwidgets.
25+
```r
26+
# make sure webshot is installed to take pictures of htmlwidgets
27+
if (!("webshot" %in% installed.packages()[, "Package"])) {
28+
install.packages("webshot")
29+
# restart R process to fully integrate with knitr
30+
}
31+
reprex::reprex({
32+
library(leaflet)
33+
# insert reprex here
34+
leaflet() %>% addTiles()
35+
})
36+
```
2537

2638
Delete these instructions once you have read them.
2739

0 commit comments

Comments
 (0)