[Rd] plotmath indices: suggested addition to help file

Martin Maechler maechler at stat.math.ethz.ch
Fri Jan 21 11:27:36 CET 2011

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]]))


    CB> Claudia

More information about the R-devel mailing list