From 28191952a8fe85351d0142bf192ec7f2855627d4 Mon Sep 17 00:00:00 2001 From: Chris Beeley Date: Wed, 17 Mar 2021 19:45:38 +0000 Subject: [PATCH] Fix file location of Report.Rmd when installing with devtools::install_github() --- R/mod_report_builder.R | 11 +++++++---- report.Rmd => inst/report.Rmd | 0 2 files changed, 7 insertions(+), 4 deletions(-) rename report.Rmd => inst/report.Rmd (100%) diff --git a/R/mod_report_builder.R b/R/mod_report_builder.R index d423222..d8e49c5 100644 --- a/R/mod_report_builder.R +++ b/R/mod_report_builder.R @@ -34,10 +34,13 @@ mod_report_builder_server <- function(id, filter_sentiment, filter_data, data = filter_data() ) - rmarkdown::render("report.Rmd", output_format = "word_document", - output_file = "report.docx", - quiet = TRUE, params = params, - envir = new.env(parent = globalenv()) + rmarkdown::render( + system.file("report.Rmd", + package = "experiencesdashboard"), + output_format = "word_document", + output_file = "report.docx", + quiet = TRUE, params = params, + envir = new.env(parent = globalenv()) ) # copy docx to 'file' diff --git a/report.Rmd b/inst/report.Rmd similarity index 100% rename from report.Rmd rename to inst/report.Rmd