Closed MorganePhilipp closed 3 years ago
To fix this issue, we find out with @biethbr1 two solutions:
Example:
report_name = "ggPMX_report_project"
ctr %>% pmx_report(name = report_name, save_dir = '.../GGPMX', format = "both", footnote = TRUE, extension = c("pdf","word"), template = '.../GGPMX/ggPMX_report.Rmd')
Example:
report_name = "ggPMX_report"
ctr %>% pmx_report(name = report_name, save_dir = '.../GGPMX2', format = "both", footnote = TRUE, extension = c("pdf","word"), template = '.../GGPMX/ggPMX_report.Rmd')
Bug description I modify the standard ggpmx markdown code in order to customize my report and add plots. To do so, I create a new folder that I call 'GGPMX', I copy the standard ggpmx markdown that I rename 'ggPMX_report.Rdm' and then I modify it. When I launch the R code below to generate the ggPMX report, my markdown code just disappear and I get this error message: _Error in pmx_draft(contr, name, template, edit) : !Template .../GGPMX/ggPMXreport.Rmd DO NOT EXIST
How this issue can be fixed ?
R code use
------------- ggPMX controller --------------
Set-up the Monolix output directory
work_dir = 'xxx' dir = 'xxx' inp = "xxx"
Set-up working directory
setwd(work_dir)
Create controller
ctr = pmx_mlx(config = "standing", directory = dir, input = inp, dv = 'DV', time = 'TIM', dvid = 'DVID', cats = c('SEX'), conts = c('WT0'))
------------- ggPMX report customization --------------
File Name for ggPMX report
report_name = "ggPMX_report"
Report creation
ctr %>% pmx_report(name = report_name, save_dir = '.../GGPMX', format = "both", footnote = TRUE, extension = c("pdf","word"), template = '.../GGPMX/ggPMX_report.Rmd')
Screenshots