[R-meta] Superscript between 'author name,' and 'year'

Viechtbauer, Wolfgang (NP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Mon May 23 15:01:16 CEST 2022


Dear Josh,

In the example, try:

dat$slab.ref <- mapply(function(x,y,z) as.expression(bquote(.(x)*","^.(y)~.(z))), dat$author, dat$trial, dat$year)

In general, read ?plothmath, ?bquote, and ?mapply to understand how all of this works.

Best,
Wolfgang

>-----Original Message-----
>From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org] On
>Behalf Of Joshua Bernal
>Sent: Monday, 23 May, 2022 14:26
>To: r-sig-meta-analysis using r-project.org
>Subject: [R-meta] Superscript between 'author name,' and 'year'
>
>Dear Dr. Viecthbauer and members,
>
>I am seeking help on how to modify the code for inserting superscripts
>by the author(s)/year entries in metafor
>(https://www.metafor-project.org/doku.php/plots:forest_plot_with_superscripts)
>such that the superscript falls between the author name and year, eg,
>Smith,^10 2022, as opposed to Smith, 2022^10.
>
>Thank you very much in advance for your help!
>
>Josh



More information about the R-sig-meta-analysis mailing list