Skip to content

Commit

Permalink
better isolated generation of manuscript or via plan
Browse files Browse the repository at this point in the history
  • Loading branch information
rmflight committed Feb 24, 2022
1 parent 95b37de commit 65af1b4
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 14 deletions.
16 changes: 12 additions & 4 deletions R/plan.R
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,18 @@ the_plan <-
pca_eval_summary = summarize_by_pca(all_pca_eval),

single_core_perf = run_single_cor(),
complexity_figure = create_complexity_figure(single_core_perf),
complexity_figure = create_complexity_figure(single_core_perf)

supp_materials = render_docx(input_rmd = knitr_in(here::here("doc", "supplemental_materials.Rmd")), here::here("doc", "supplemental_materials.docx")),
supp_tables = render_docx(input_rmd = knitr_in(here::here("doc", "supplemental_tables.Rmd")), here::here("doc", "supplemental_tables.docx"), supp_materials),
manuscript = render_docx(input_rmd = knitr_in(here::here("doc", "ici_kt_manuscript.Rmd")), here::here("doc", "ici_kt_manuscript.docx"), supp_materials)
# add a comma after above target, and uncomment below if you want
# to generate manuscript as part of the overall plan.
# This may or may not be what you want to do.
#
# Alternatively, you can do
# source("generate_manuscript.R")
#
#
# supp_materials = render_docx(input_rmd = knitr_in(here::here("doc", "supplemental_materials.Rmd")), here::here("doc", "supplemental_materials.docx")),
# supp_tables = render_docx(input_rmd = knitr_in(here::here("doc", "supplemental_tables.Rmd")), here::here("doc", "supplemental_tables.docx"), supp_materials),
# manuscript = render_docx(input_rmd = knitr_in(here::here("doc", "ici_kt_manuscript.Rmd")), here::here("doc", "ici_kt_manuscript.docx"), supp_materials)

)
Binary file modified doc/ici_kt_manuscript.docx
Binary file not shown.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/supp_figure_count.rds
Binary file not shown.
Binary file added doc/supp_stuff.rda
Binary file not shown.
Binary file added doc/supp_table_count.rds
Binary file not shown.
Binary file modified doc/supplemental_materials.docx
Binary file not shown.
Binary file modified doc/supplemental_tables.docx
Binary file not shown.
35 changes: 25 additions & 10 deletions generate_manuscript.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
# for the manuscript
source("./packages.R")
lapply(list.files("./R", full.names = TRUE), source)
# we process the supplement first so we can refer to the figures and tables
# in there in the main manuscript
rmarkdown::render("./doc/supplemental_materials.Rmd")
rmarkdown::render("./doc/supplemental_tables.Rmd")
#beepr::beep(2)
rmarkdown::render("./doc/ici_kt_manuscript.Rmd")
library(callr)
supp_materials = r(
function(){
source("./packages.R")
lapply(list.files("./R", full.names = TRUE), source)
rmarkdown::render(here::here("doc", "supplemental_materials.Rmd"))
}, show = TRUE
)

supp_tables = r(
function(){
source("./packages.R")
lapply(list.files("./R", full.names = TRUE), source)
rmarkdown::render(here::here("doc", "supplemental_tables.Rmd"))
}, show = TRUE
)

beepr::beep(2)
manuscript = r(
function(){
source("./packages.R")
lapply(list.files("./R", full.names = TRUE), source)
rmarkdown::render(here::here("doc", "ici_kt_manuscript.Rmd"))
}, show = TRUE
)

#beepr::beep(2)

0 comments on commit 65af1b4

Please sign in to comment.