在使用ggplot2创建的绘图底部添加脚注的最佳方法是什么?我尝试过使用这里提到的逻辑组合 http://www.r-bloggers.com/r-good-practice-%E2%80%93-adding-footnotes-to-graphics/ 以及ggplot2 annotate函数
p + annotate("text",label="Footnote",
x=unit(1,"npc") - unit(2, "mm"),y=unit(2, "mm"),
just=c("right", "bottom"),gp=gpar(cex= 0.7, col=grey(.5)))
但是我收到错误“as.data.frame.default(x [[i]]中的错误,可选= TRUE,stringsAsFactors = stringsAsFactors):无法将类c(”unit.arithmetic“,”unit“)强制转换为data.frame”。