svg.filenames <- sapply(1:2, function(i) {
fn <- tempfile(fileext = ".svg")
svg(fn)
plot(1:10, main = paste("Plot", i), col = i)
dev.off()
fn
})
grep("glyph", readLines(svg.filenames[1]), value = TRUE)
uniquify.ids.in.svg.files(svg.filenames)
grep("glyph", readLines(svg.filenames[1]), value = TRUE)
Run the code above in your browser using DataLab