For a forest plot, I aim to paste the column of the Study Label ("Author (year)") with a column of superscript citation numbers. Basically, it works easy to paste the study label and citation numbers:
df <- data.frame(matrix(ncol = 2, nrow = 3))
colnames(df)[1:2] <- c("studylabel", "citation")
df$studylabel <- c("Autor A (1987)", "Author B (2002)", "Author C (2023)")
df$citation <- c(6, 13, 28)
df$goal <- paste0(df$studylabel, df$citation)
df$unicode <- c("\u2076", "\u00B9\u00B3", "\u00B2\u2078")
The unicode column works well for some citations, however, if the reference list contains more than 30 citations whose numbers are not sequential, this is a not too economical way to go.
In a similar question R forest plot author list superscript I did not found a solution. In addition, I did not succeed with expression and "^". When I include "^", an Error occurs: Error: unexpected '^'
Do you know an easy way to convert a column of numbers in a column of superscript numbers?