Drafting a manuscript I must do a Figure with 2 panes (A and B). I have 2 distinct R codes that produce 2 distinct pdf files.
Is there an R function that can take the pdf files and collapse them into one single pdf?
I sake of tidy code I'd like to keep single codes that produce a single figure separately.
Thank all!
Example:
code_1.R
> x <- 1:10
>
> pdf(file="A.pdf") plot(x) dev.off()
code_2.R
> x <- 20:10
>
> pdf(file="B.pdf") plot(x) dev.off()
I wish to know if exists a R function that can read directly A.pdf and B.pdf and create a file.