Created
May 3, 2021 11:14
-
-
Save k-hench/7e8d8e1ee23ab4b4dc293acd08305893 to your computer and use it in GitHub Desktop.
small demo of how to use exiftoolr to add plot metadata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remotes::install_github("JoshOBrien/exiftoolr") | |
library(exiftoolr) | |
library(tidyverse) | |
ggplot(mtcars, aes(x = mpg, y = drat)) + geom_point() | |
ggsave("test.pdf") | |
ggsave("test.png") | |
message <- "created using the Rscript 'r_exiftool.R' by Kosmas Hench" | |
exif_call(args = str_c("-Description=",message), path = "test.png") | |
exif_call(args = str_c("-Description=",message), path = "test.pdf") | |
exif_read("test.pdf")$Description | |
exif_read("test.png")$Description |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment