dbosak01 / reporter

An R package to write statistical reports.
Creative Commons Zero v1.0 Universal
16 stars 3 forks source link

Creating plot fail in batch on Linux #330

Closed dbosak01 closed 8 months ago

dbosak01 commented 8 months ago

User trying to create a plot and running in batch mode on Linux. Error occurred in write_report():

When I batch run the figures while following error occurred, and I have no any clue for it, could you please help to have a look and hope you have experience for it, many thanks for your help

Structure of program is attached, everything is OK before the last code (row 75), once added #75, there is an error:

Error message:

And the program can run successfully in the R studio, but with error for batch run…

dbosak01 commented 8 months ago

Since Linux will call X11 to plot by default, but X11 isn’t open in the terminal, error occurred

A temporary way is to save plot by specify type='cairo' first, and then pass this plot (png or jpeg) to create_plot function, so batch run can work 😊