Re: [Rd] Expressions from boxplot() passed to bxp()

2020-03-27 Thread peter dalgaard
It's not new anyway. You see the same behaviour with boxplot(dat, ylab=quote(X[2])) and it boils down to the use of do.call("bxp", ...) in the internals. As a general matter, expression() exists to prevent this sort of confusion, e.g., in this construction, > X <- quote(Y+1); bquote(f(.(X)))

[Rd] Expressions from boxplot() passed to bxp()

2020-03-26 Thread Marius Hofert
Hi, Is this expected behavior (R-3.6.0)? dat <- cbind(x = 1:10, y = 10:1) ylab <- substitute(X[t], list(t = 2)) plot(dat, ylab = ylab) # works (correctly displays ylab) boxplot(dat, ylab = ylab) # fails boxplot(dat, ylab = as.expression(ylab)) # works Thanks & cheers, M