Displaying 1 result from an estimated 1 matches for "321263".
Did you mean:
32126
2009 Dec 04
5
logical masking of a matrix converts it to a vector
One problem I've been having is the special case in which only one
row/column remains and the variable gets converted into a vector when
entries are removed by logical masking. This is a problem because subsequent
code may rely on matrix operations (apply, colsums, dim, etc) For example:
> a <- matrix(c(1, 2, 3, 4), nrow = 2)
> a
[,1] [,2]
[1,] 1 3
[2,] 2 4
>