我正纠结于如何在我的r markdown文档的r块中使用[^1]个脚注。我有一个表,我需要向其中添加一些脚注,但我不知道如何添加它们。我希望1下标显示在单词“Pay”的末尾旁边我在尝试向“key_points”列中的第一个条目添加脚注时尝试了以下代码:
mainPoints <- data.frame(key_points = c(paste0("Median Pay", [^1], "has increased by ", YearChangePct, "%"),
paste0("Top decile Pay: £", TopDecile,"\nBottom decile Pay: £", BottomDecile),
paste0(PayRisePct, "% of BLUB staff received a pay\nincrease between ", currentyear - 1, " and ", currentyear),
paste0("Gender Pay gap is ", GenderPayGap, "%")),
Commentary = c(paste0("The average (median full-time equivalent) pay of BLUB staff is £", CurrentYearMedian, " which is an increase of ", YearChangePct, "% on the equivalent figure for ", currentyear -1, ". The overall pay award for the BLUB for ", currentyear -1, " was 1%."),
paste0("Pay of £", BottomDecile, " would put someone in the bottom 10% of BLUB staff, whereas pay of £", TopDecile, " would put someone in the top 10% of BLUB staff."),
paste0("The extent of the increase varied between grades: ", AApct, "% of AA staff received a pay increase between 0.1% and 1.9%. ", IND2pct,"% of Industrial 2 staff received a pay increase between 4.0% and 5.9%."),
paste0("There continues to be a gap between male and female pay in the BLUB – the median pay for females is ", GenderPayGap, "% lower than the median pay for males.")))
names(mainPoints) <- c("Key Points", "Commentary")
1条答案
按热度按时间cngwdvgl1#
插入符号必须在方括号之前:
^[footnote content]
您可以将其包含在字符串中:
"Median Pay^[footnote content] has increased by "
通过
knitr::kable(mainPoints)
传递您的表将完成这项工作: