Closed BenjaminWolfe closed 4 years ago
Other quick notes while I'm in here…
library(flipbookr)
commented out, and it definitely needs that!Lastly, the just_for_evamaerey
chunks still resulted in errors for me, and I'm not 💯 sure why.
To make that even less likely, you could do something like this!
Add this to your initial chunk:
template_dir <- file.path("flipbookr", "inst", "rmarkdown", "templates")
is_template <- stringr::str_detect(knitr::current_input(dir = TRUE), template_dir)
And then instead of eval = T
for the just_for_evamaerey
chunk, you could use eval = is_template
.
If you like these changes I could do a pull request, or a series of them one for each thing I brought up.
Thanks for these! I hope to get to them soon! Have some ideas...
made some adjustments... So far not doing anything with the just for me chunk, but might come back to it.
Ooh ooh but also if you did decide to keep this in the main branch, you could also wrap what I wrote above into a function:
is_template <- function() {
template_dir <- file.path("flipbookr", "inst", "rmarkdown", "templates")
stringr::str_detect(knitr::current_input(dir = TRUE), template_dir)
}
And you wouldn't even have to export it! And you could use eval=flipbookr:::is_template()
!
Buuuuuuuut I guess I see how it might be better to use a development branch. :smile:
Hi @EvaMaeRey!!
Using your package for a tech talk at work! Quick note that the starter template needs the {gt} package but I didn't have that installed and I don't think I saw it mentioned in the readme instructions anywhere. Tweaking that could make the process a little smoother for the total beginner!
Maybe you could add it to the
suggests
for the package (along with {xaringan}), and in the readme offer—because
dependencies
is then passed on in the...
toinstall
which takes it frominstall.packages
, where it says this: