Message-ID: <19769.24472.996333.510972@stat.math.ethz.ch>
Date: 2011-01-21T10:27:36Z
From: Martin Maechler
Subject: plotmath indices: suggested addition to help file
In-Reply-To: <4D383325.5060604@units.it>
Thank you, Claudia,
>>>>> "CB" == Claudia Beleites <cbeleites at units.it>
>>>>> on Thu, 20 Jan 2011 14:05:41 +0100 writes:
CB> Dear all, I just stumbled over the fact that subsetting
CB> by square bracket will only output the first given
CB> index. I guess the rest is thrown away by the CADDR in
CB> RenderSub (plotmath.c l. 1399). Maybe changing this
CB> could be considered as "low-priority desired" (would be
CB> nice if the output works for ?
I agree this is a ``missing feature'' and well worth wish list item.
CB> However, I suggest to announce the fact that only the
CB> first parameter is printed in plotmath.Rd.
CB> E.g. in the table l. 72
CB> \code{x[i]} \tab x subscript i; escape further indices (\code{x ["i, j"]})\cr
How would get the equivalent of LaTeX x_{i_1, j_2} ?
Not by making it a string (that's not escape, I'd say),
but by something like
plot(0, axes=FALSE, main= expression(paste(x[i[1]],{}[j[2]])))
which works +-
but of course is unnecessarily ugly, compared to the desired
plot(0, axes=FALSE, main= expression( x[i[1], j[2]]))
Martin
CB> Claudia