From: Keith G. <kwg...@gm...> - 2006-07-12 02:50:49
|
On 7/11/06, David Huard <dav...@gm...> wrote: > > > 2006/7/11, JJ <jos...@ya...>: > > 1) is it possible to get the function unique() to work with matrices, > perhaps > > with a unique_rows() function to work with matrices of more than one > column? > > > The problem is that applying unique to different rows will return vectors > with different lengths. So you could not return an array, much less a > matrix. ...unless it returned the unique rows instead of the unique elements in each row. So if the matrix is 1 2 2 3 4 5 1 2 2 then the unique rows would be 1 2 2 3 4 5 |