save_kable does not work


I am trying to create a table in R. However, save_kable reports an error I do not understand.

SEATS<- data.frame(matrix(ncol = 3, nrow = 10))
rownames(SEATS) <- c("European People's Party group (EPP)", 
                     "Progressive Alliance of Socialists and Democrats (S&D)",
                     "European Conservatives and Reformists (ECR)",
                     "Group of the Alliance of Liberals and Democrats for Europe (ALDE)",
                     "European United Left/Nordic Green Left (GUE/NGL)",
                     "The Greens/European Free Alliance (Greens/EFA)",
                     "Europe of Freedom and Direct Democracy (EFDD)",
                     "Europe of Nations and Freedom (ENF)",
                     "Union for Europe of the Nations (UEN)",
                     "Independence/Democracy (IND/DEM)")

colnames(SEATS) <-c("6th EP","7th EP","8th EP")

SEATS[1,] <- c(288,273,216)
SEATS[2,] <- c(218,195,185)
SEATS[3,] <- c(0,57,77)
SEATS[4,] <- c(100,83,69)
SEATS[5,] <- c(40,35,52)
SEATS[6,] <- c(43,57,52)
SEATS[7,] <- c(0,31,42)
SEATS[8,] <- c(0,0,36)
SEATS[9,] <- c(44,0,0)
SEATS[10,] <- c(22,0,0)

SEATSl <- kable(SEATS, format="latex")
save_kable(SEATSl, file="SEATS.png")
#> Error in save_kable_latex(x, file, latex_header_includes, keep_tex): We hit an error when trying to use magick to read the generated PDF file. You may check your magick installation and try to use magick::image_read to read the PDF file manually. It's also possible that you didn't have ghostscript installed.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.