ggPMX
ggPMX copied to clipboard
Unable to load custom template with ggPMX 1.2.8
Unable to load custom template to create report with ggPMX 1.2.8. Error message as follows:

Generated with ggPMX 1.2.8
Code
ctr %>% set_abbrev(
IPRED ='Individual prediction (ug/mL)',
PRED='Population prediction (ug/mL)',
DV='Observed conc. (ug/mL)',
TIME='Time after first dose (days)',
)
ctr %>% pmx_report(
name="Rerun_Report_ggPMX",
save_dir=model.dir,
format="both",
extensions=c("word", "pdf"),
template=file.path(model.dir, "Standard_Report_ggPMX.Rmd")
)
I am having the same issue:

Code
ctr %>% pmx_report(
name="ggPMX",
save_dir=mlx_dir,
template=file.path("ggPMX0.Rmd")
)
- confirm issue can be reproduced using a simple example:
pmx_report(
contr=theophylline(),
name="dummy",
save_dir="/tmp/",
template="/tmp/custom_report.Rmd"
)
- which throws the following error
Error in draft(template_file, template = template_dir, create_dir = FALSE, :
No template.yaml file found for template '/tmp/RtmpzatMrO/standing'
In addition: Warning message:
In file.create(to[okay]) :
cannot create file '/tmp/RtmpzatMrO/standing/skeleton/skeleton.Rmd', reason 'No such file or directory'
- will start working on debugging / fix
-
it has been possible to identify the source of the problem:
- a copy step is missing for
inst/rmarkdown/templates/standing/template.yamlinto the temporary directory used for report creation
- a copy step is missing for
-
merge request with fix forthcoming
As of latest tests, when trying to use custom template, there was no error, but the report generated was using the default template (instead of the custom one).