Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| ```{r setup, include=FALSE} | |
| knitr::opts_chunk$set(echo = F, message = F, warning = F) | |
| ``` | |
| ## Purpose | |
| I need to create a number of tabs in an Rmarkdown document, depending on the contents of the data queried. | |
| In short, the Rmarkdown document must have a tab for each factor in a dataset, and draw a ggplot in the tab. |
This file contains hidden or 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
| output$click_test <- renderPrint({reactiveValuesToList(input)}) | |
| # https://stackoverflow.com/questions/49885751/list-input-handlers-for-a-package-shiny-leaflet/49886501 | |
| # Super useful page on how to get the output of the clicks and hovers in leaflet |
This file contains hidden or 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
| knit: (function(input, ...) { | |
| rmarkdown::render( | |
| input, | |
| output_file = paste0( | |
| here::here(), '/index.html' | |
| ), | |
| envir = globalenv() | |
| ) | |
| }) |
This file contains hidden or 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
| ## I should include a function in a personal package that takes snake case, as genrated by `janitor::clean_names()` and then makes it to sentence with spaces | |
| ### It would look like: | |
| mutate(col = str_to_sentence(str_replace_all(col, "_", " "))) |