Update
Looks like to achieve the result now we should use the following:
library(ggplot2)
library(grid)
library(gridExtra)
p <- qplot(data = mtcars, wt, mpg)
grid.arrange(p, right = textGrob("File xy-12-34-56.csv", rot = -90, vjust = 1))
Old answer
Try this:
library(gridExtra)
p <- qplot(data = mtcars, wt, mpg)
print(arrangeGrob(p, legend = textGrob("File xy-12-34-56.csv", rot = -90, vjust = 1)))
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…