1
a <- "A"
bquote(.(as.name(a)) = 4)

Error: unexpected '=' in "bquote(.(as.name(a)) ="

bquote(A = 4)

Error in bquote(A = 4) : unused argument (A = 4)

a <- "A"
bquote(f(.(as.name(a)) = 4))

Error: unexpected '=' in "bquote(f(.(as.name(a)) ="

我怎样才能解决这个问题?

4

1 回答 1

2

我们不需要as.name

plot(1, 1, main = bquote(.(a) == 4))

-输出

在此处输入图像描述


或其他带引号的选项

plot(1, 1, main = bquote(.(a)~'= 4'))
于 2020-10-17T23:20:34.303 回答