-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Background Information
We want to investigate whether we can, with low cost and minimal dependencies, provide metadata support for our PDFs. All cells are saved as pdf metadata.
A hack with a title as a JSON
library(jsonlite)
# 1. Create a list of your custom metadata
my_metadata <- list(
title = "Alpha",
header1 = 42,
status = "Draft",
tags = c("R", "Plot", "JSON")
)
# 2. Convert to a JSON string - we should use base R for that - we control what we convert
json_string <- toJSON(my_metadata, auto_unbox = TRUE)
# 3. Pass the JSON string to the title argument
pdf("json_metadata_plot.png", title = json_string)
plot(1:10, main = "Data Visualization")
dev.off()
Using a system library
https://stackoverflow.com/a/24254259/5442527
Definition of Done
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels