使用数据框作为构面标签(https://ggplot2.tidyverse.org/reference/labeller.html)的查找表的语法是什么? 例如:
require(ggplot2)
df <- data.frame(value = c(1,3), variable = letters[c(1,3)])
labels <- data.frame(variable = letters[1:3], label = c("Apple", "Banana", "Cherry"))
这是失败的尝试:
ggplot(df, aes(x = "x", y = value)) + geom_col() + facet_grid( ~ variable, labeller = as_labeller(labels))
答案 0 :(得分:1)
您想要一个命名的字符向量
$email->addAttachment($_SERVER['DOCUMENT_ROOT'] . $submission->MyFile()->Filename);