Displaying 1 result from an estimated 1 matches for "nwld".
Did you mean:
nwl
2007 Mar 08
2
Removing duplicated rows within a matrix, with missing data as wildcards
I'd like to remove duplicated rows within a matrix, with missing data
being treated as wildcards.
For example
> x <- matrix((1:3), 5, 3)
> x[4,2] = NA
> x[3,3] = NA
> x
[,1] [,2] [,3]
[1,] 1 3 2
[2,] 2 1 3
[3,] 3 2 NA
[4,] 1 NA 2
[5,] 2 1 3
I would like to obtain
[,1] [,2] [,3]
[1,] 1 3 2
[2,] 2 1 3