{"id":3091,"date":"2023-05-28T22:43:03","date_gmt":"2023-05-28T22:43:03","guid":{"rendered":"http:\/\/optimumsportsperformance.com\/blog\/?p=3091"},"modified":"2023-05-29T12:20:45","modified_gmt":"2023-05-29T12:20:45","slug":"tidyx-146-adding-a-download-option-to-shiny-apps","status":"publish","type":"post","link":"https:\/\/optimumsportsperformance.com\/blog\/tidyx-146-adding-a-download-option-to-shiny-apps\/","title":{"rendered":"TidyX 146: Adding a download option to Shiny apps"},"content":{"rendered":"<p>This week, <span style=\"color: #0000ff;\"><strong><a style=\"color: #0000ff;\" href=\"https:\/\/twitter.com\/ellis_hughes\">Ellis Hughes<\/a><\/strong><\/span> and I discuss how to add a download button to the user interface of a {<strong>shiny<\/strong>} app. We provide two options for completing this task:<\/p>\n<ol>\n<li>Using a <strong>downloadHandler()<\/strong>, which requires some additional coding but produces a nice downloadable PDF.<\/li>\n<li>Using the {<strong>shinyscreenshot<\/strong>} package, which offers a very simple button to click and produce a screen shot of the shiny page in a PNG form.<\/li>\n<\/ol>\n<p>To watch our screen cast, <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/www.youtube.com\/watch?v=W47GNlwDkxg\">CLICK HERE<\/a><\/span><\/strong>.<\/p>\n<p>To access our code, <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/github.com\/thebioengineer\/TidyX\/blob\/master\/TidyTuesday_Explained\/146-Can_You_Download_Handler_This\/TidyX_Episode_146.R\">CLICK HERE<\/a><\/span><\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week, Ellis Hughes and I discuss how to add a download button to the user interface of a {shiny} app. We provide two options for completing this task: Using a downloadHandler(), which requires some additional coding but produces a nice downloadable PDF. Using the {shinyscreenshot} package, which offers a very simple button to click [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44],"tags":[],"class_list":["post-3091","post","type-post","status-publish","format-standard","hentry","category-tidyx-screen-cast"],"_links":{"self":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/3091","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/comments?post=3091"}],"version-history":[{"count":1,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/3091\/revisions"}],"predecessor-version":[{"id":3092,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/3091\/revisions\/3092"}],"wp:attachment":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/media?parent=3091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/categories?post=3091"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/tags?post=3091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}