[R] verInd= and HorInd= arguments to pairs() function

Martin Maechler m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Fri Jun 8 12:02:43 CEST 2018


>>>>> Martin Maechler 
>>>>>     on Fri, 8 Jun 2018 11:13:24 +0200 writes:

[..........]

    >> Thank you, Chris, for the report and
    >> Gerrit for your proposed fix !!
    >> 
    >> It looks good to me,  but I will test some more (also with
    >> 'row1attop=FALSE')  before committing the bug fix.

    > and there, another change was needed:  Instead of your

    > for (j in if (row1attop) verInd else rev(verInd))
    >    for (i in horInd) {

    > we do now need

    > for(j in verInd)
    >    for(i in if(row1attop) horInd else rev(horInd)) {

    > and the difference is of course only relevant for the
    > non-default  'row1attop = FALSE'

    > (which some graphic experts argue to be clearly *better* than the default,
    > as only in that case,  the upper and lower triangles of the
    > matrix are nicely "mirrors of each other", and that is also
    > the reason why  lattice::splom()  uses the equivalent of
    > 'row1attop=FALSE')

    > I will commit the change to R-devel today - and intend to port
    > to R-patched in time to make it into the upcoming R 3.5.1.

Well, as I find, there are more bugs there, if you are using
'horInd' and 'verInd' creatively:

In a nice pairs(), the axis ticks (and their labels (numbers))
are always "on the outside" of the scatterplot matrix, and
nicely alternating.  This is not the case unfortunately, when using
 horInd or verInd which are *not* of the form p1:p2 (p1 <= p2)

==> even more changes are needed to make these cases "nice",
or  should we *require* horInd and verInd to be of that form??

This would not be back-compatible, but than such cases have been
"wrong" really in all versions of R anyway, *and*  at least be
reordering the matrix/data.frame columns, the restriction of

    (hor|ver)Ind =  p1:p2 (p1 <= p2)

would seem acceptable, would it ?




More information about the R-help mailing list