R语言几行代码拼接pdf文件

2020-08-17 21:52:11 浏览数 (1)

代码语言:javascript复制
library(qpdf) 
# Merge multiple PDF files into one
## 一行代码搞定
pdf_combine(c("test1.pdf","test2.pdf"),
            output = "joined.pdf")
代码语言:javascript复制
########################################################## 


########################################################## 

library(ggplot2)

library(meta)

library(dplyr)

library(tibble)

library(tidyr)

options(stringsAsFactors = F)

rm(list=ls()) 


# source("http://bioconductor.org/biocLite.R")
# biocLite("EBImage")

library("EBImage")

library(OpenImageR)


lenac1 <- readImage('test1.png')
lenac2 <- readImage('test2.png')
lenac3 <- readImage('test3.png')

lenacomb <- combine(lenac1, lenac2 ,lenac3)

display(lenacomb,method="raster",all=T)

png(file = 'lenacomb.png', width = 1200, height = 1200)
display(lenacomb,method="raster",all=T)
dev.off()
pdf

0 人点赞