将森林图中的小数改为中线小数。

huangapple go评论129阅读模式
英文:

Changing decimal in forest plot to midline decimal

问题

在使用meta-package中的forest()函数创建的森林图中,我需要将报告的估计值和置信区间的小数点从普通小数点(例如,27.3)更改为中线小数点(例如,27·3)。

是否有任何方法?

我没有在RDocumentation或互联网上找到有关中线格式的信息。关于metafor-package的类似问题自2014年以来一直没有答案:https://stat.ethz.ch/pipermail/r-help/2014-July/376390.html

英文:

In my forest plot conducted with the forest()-function in the meta-package, I need to change the decimal points of the reported estimates and confidence intervals from normal decimal points (e.g., 27.3) into midline decimal points (e.g., 27·3).

Is there any way?

I did not find any information on midline formattting in the RDocumentation or the internet. A similar question for the metafor-package remained unanswered since 2014: https://stat.ethz.ch/pipermail/r-help/2014-July/376390.html

答案1

得分: 0

这个链接实际上有很多回复(请看这里)。正如我当时建议的,可以使用 options(OutDec=<>)。当时我建议使用 options(OutDec="\xB7"),但这可能不起作用。相反,您可以尝试直接指定一个中间的小数符号,如 options(OutDec="·")。在我的机器上运行以下代码完全没有问题:

data(Olkin1995)

m1 <- metabin(ev.exp, n.exp, ev.cont, n.cont,
              data = Olkin1995, subset = c(41, 47, 51, 59),
              sm = "RR", method = "I",
              studlab = paste(author, year))

options(OutDec="·")
forest(m1)

我在Windows和Linux下进行了测试。

英文:

The thread you linked to actually has a bunch of responses (see here). As I suggested back then, using options(OutDec=<>) can work. Back then, I suggested using options(OutDec="\xB7") but this may not work. Instead, you could try directly specifying a midline decimal symbol with options(OutDec="·"). Running the following code on my machine works just fine:

data(Olkin1995)

m1 <- metabin(ev.exp, n.exp, ev.cont, n.cont,
              data = Olkin1995, subset = c(41, 47, 51, 59),
              sm = "RR", method = "I",
              studlab = paste(author, year))

options(OutDec="·")
forest(m1)

I tested this under Windows and Linux.

huangapple
  • 本文由 发表于 2023年6月19日 23:36:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/76508130.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定