Skip to content
Prev 2531 / 5636 Next

[R-meta] Superscript in Forest plot (meta)

Am 17.12.20 um 17:02 schrieb Tobias Saueressig:
The following auxiliary R function could be handy in that case:

JAMAlabels <- function(author, year, reference) {
 ? res <- NA
 ? for (i in seq(along = author))
 ??? res[i] <-
 ????? as.expression(substitute(study^ref~(year),
 ?????????????????????????????? list(study = author[i],
 ??????????????????????????????????? ref = reference[i],
 ??????????????????????????????????? year = year[i])))
 ? ##
 ? res
}

refs <- 20 + seq_len(nrow(Fleiss1993bin))
##
mylabs <-
 ? JAMAlabels(Fleiss1993bin$study, Fleiss1993bin$year, refs)

I will probably add this function to R package meta with the next update.

BW Guido