Claudia Beleites
2011-Jan-20 13:05 UTC
[Rd] plotmath indices: suggested addition to help file
Dear all, I just stumbled over the fact that subsetting by square bracket will only output the first given index. I guess the rest is thrown away by the CADDR in RenderSub (plotmath.c l. 1399). Maybe changing this could be considered as "low-priority desired" (would be nice if the output works for ? However, I suggest to announce the fact that only the first parameter is printed in plotmath.Rd. E.g. in the table l. 72 \code{x[i]} \tab x subscript i; escape further indices (\code{x ["i, j"]})\cr Claudia -- Claudia Beleites Dipartimento dei Materiali e delle Risorse Naturali Universit? degli Studi di Trieste Via Alfonso Valerio 6/a I-34127 Trieste phone: +39 0 40 5 58-37 68 email: cbeleites at units.it
Martin Maechler
2011-Jan-21 10:27 UTC
[Rd] plotmath indices: suggested addition to help file
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