R表达式用文本和多个下标绘制CI

发布于 2025-01-20 11:04:07 字数 390 浏览 2 评论 0原文

我在 R 中编写使用复杂下标的特定表达式时遇到问题。表达式应如下所示: $(A_{1,2,L}, A_{1,2,U})$

我有一个可以生成正确下标的表达式(下面的示例),但我无法添加逗号条目之间。我需要使用 substitute()group() 吗?

plot(NULL, xlim = c(0, 2), ylim = c(0,2))
text(x = 1, y = 1, label = expression((A["1,2,L"]~A["1,2,U"])))

不带逗号的示例输出

I'm having trouble writing a particular expression in R that uses complex subscripts. The expression should look like this: $(A_{1,2,L}, A_{1,2,U})$

I have an expression that produces the correct subscripts (example below) but I'm unable to add the comma between the entries. Do I need to use substitute() or group()?

plot(NULL, xlim = c(0, 2), ylim = c(0,2))
text(x = 1, y = 1, label = expression((A["1,2,L"]~A["1,2,U"])))

Output of example without comma

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浅紫色的梦幻 2025-01-27 11:04:08

您需要将两个表达式放在列表list(Expr1,Expr2)中。

plot(NULL, xlim = c(0, 2), ylim = c(0,2))

text(x = 1, y = 1, label = expression((list(A["1, 2, L"] , A["1, 2, U"]))))

You need to put the two expressions in a list list(expr1, expr2).

plot(NULL, xlim = c(0, 2), ylim = c(0,2))

text(x = 1, y = 1, label = expression((list(A["1, 2, L"] , A["1, 2, U"]))))

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文