Skip to content
Prev 326837 / 398503 Next

Matrix column flip when recycled

Only vectors recycle. If you don't want the behaviour if the matrix to reflect that of the underlying vector then don't use recycling. Instead use indexing.

M.1 <- M.2[rep(1:5,3),]
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
Thiem Alrik <thiem at sipo.gess.ethz.ch> wrote: