ggPMXdevelopment / ggPMX

ggPMX R package
37 stars 11 forks source link

Unable to load custom template with ggPMX 1.2.8 #256

Open biencan1 opened 2 years ago

biencan1 commented 2 years ago

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

image

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")
)
tmss1 commented 2 years ago

I am having the same issue: image

Code

ctr %>% pmx_report(
  name="ggPMX",
  save_dir=mlx_dir,
  template=file.path("ggPMX0.Rmd")
)
tynsci commented 1 year ago
pmx_report(
  contr=theophylline(),
  name="dummy",
  save_dir="/tmp/",
  template="/tmp/custom_report.Rmd"
)
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'
tynsci commented 1 year ago
baltcir1 commented 1 year ago

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).