Asteroid098
Asteroid098

Reputation: 2825

error when using dfSummary in summarytools

I am using summarytools in rmarkdown and I followed the instructions to print a summary statistics table, but it would not work:

dfSummary(tobacco, plain.ascii = FALSE, style = "grid", 
          graph.magnif = 0.75, valid.col = FALSE, tmp.img.dir = "/tmp")

I get an error:

Error in magick_image_write, RGB color space not permitted on grayscale PNG

Is there a way to get around the error? I checked and magick is installed properly.

Upvotes: 1

Views: 952

Answers (2)

Since the issue is related to image handling, you can try disabling the graphs in the summary by setting graph.col = FALSE. This will remove the graphical summaries, which might help avoid dfSummary(tobacco, plain.ascii = FALSE, style = "grid",graph.magnif = 0.75, valid.col = FALSE, tmp.img.dir = "/tmp",graph.col = FALSE)

Upvotes: 0

Dominic Comtois
Dominic Comtois

Reputation: 10401

could you provide more info on your system?

Until this is resolved, what you could do is go back to an earlier version of summarytools, for instance:

devtools::install_github("dcomtois/summarytools", ref = "0.8.9")

If you want, you can open an issue on the project page on GitHub and we can look into this in more depth.

Upvotes: 0

Related Questions