I am trying to arrange plots from pdf to a single plot as grid. Here is the code and error:
pdffiles <-
list.files(
path = here::here("/Users/test/"),
recursive = TRUE,
pattern = "\\.pdf$",
full.names = T
)
magick::image_read_pdf(pdffiles) %>%
magick::image_montage(tile = "2x5", geometry = "x500+10+5") %>%
magick::image_write(
format = ".pdf", path = here::here(paste(name,"_All.pdf",sep="")),
quality = 100
)
Error in file(con, "rb") : invalid 'description' argument
In addition: Warning messages:
1: In if (is_svg(path)) return(path) :
the condition has length > 1 and only the first element will be used
2: In if (is_url(path)) { :
the condition has length > 1 and only the first element will be used
3: In if (grepl("^[^/\\]+:($|[^/\\])", path)) { :
the condition has length > 1 and only the first element will be used
Can anyone help?
Thanks!