Каков наилучший способ добавить сноску в конец графика, созданного с помощью ggplot2? Я попытался использовать комбинацию отмеченной здесь логики, а также функцию annotate
ggplot2.
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