samePDF | R Documentation |
Check whether two PDF files have the same content, ignoring some details like creation time and modification time.
samePDF(file1, file2)
file1, file2 |
Names of PDF files to compare. |
This function will compare any two files, byte by byte, but if a file is a PDF file that was generated by R, it will discard the file header, which may contain differences that do not matter, such as the creation date.
A logical value.
Paul Murrell
f1 <- tempfile(fileext=".pdf")
f2 <- tempfile(fileext=".pdf")
pdf(f1)
plot(1)
dev.off()
pdf(f2)
plot(2)
dev.off()
samePDF(f1, f1)
samePDF(f1, f2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.