https://github.com/jienagu/noteMD
Print text from shiny ui (support markdown syntax) to pdf or word report
https://github.com/jienagu/noteMD
Last synced: 3 months ago
JSON representation
Print text from shiny ui (support markdown syntax) to pdf or word report
- Host: GitHub
- URL: https://github.com/jienagu/noteMD
- Owner: jienagu
- License: mit
- Created: 2019-01-23T02:12:52.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-26T15:43:33.000Z (over 4 years ago)
- Last Synced: 2024-08-06T03:04:28.181Z (7 months ago)
- Language: R
- Size: 1.72 MB
- Stars: 83
- Watchers: 4
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - jienagu/noteMD - Print text from shiny ui (support markdown syntax) to pdf or word report (R)
README
# noteMD
Print text from shiny ui (support markdown syntax) to pdf or word report!
This is a live demo shiny app using `noteMD` R package: https://appforiarteam.shinyapps.io/noteMD_shiny_demo/
Code of this live demo shiny app is here (welcome to download): https://github.com/jienagu/noteMD_shiny_app## Acknowledgement
Beef Cattle Institute at Kansas State University: https://ksubci.org/Special thanks to Yihui Xie (from RStudio.LLC), Dr. Brad White and Dr. David Amrine
## Install
`install.packages("noteMD")`Install from GitHub :
`devtools::install_github("jienagu/noteMD")`
Basically, this is how to use `noteMD` to insert a text box in your shiny ui (support markdown syntax) to pdf or word report!
* Step 1: create a textarea in shiny ui:
` tags$textarea(
"Please using any **markdown** syntax!",
id = 'markdowninput',
rows = 3,
style = 'width:100%;')`, here we know the id of this tag is `markdowninput` (you can name whatever you want)* Step 2: if you want to have a preview in shiny app like the demo, use `output$htmlmarkdown = reactive({note_in_html(input$markdowninput) }) ` , then `htmlOutput('htmlmarkdown')` in shiny ui
* Step 3: if your report is in pdf, put `note_in_md_pdf(input$markdowninput)` in an R chunk (whereever you want to insert the text); if your report is in word, put `note_in_md_word(input$markdowninput)` in an R chunk!
Future improvements:
* Support math formula writtingEnjoy!