Re: [R] how to remove one row at a time from a matrix keeping its nrow consistent

2010-04-17 Thread David Winsemius
On Apr 17, 2010, at 2:25 PM, wrote: After some headache with debugging my script, I finally isolated the problem taht I am going to illustrate in the following example. I expected matrix nrow to decrease consistently till 1. Instead, when the matrix is left with one row only, its nrow jumps

Re: [R] how to remove one row at a time from a matrix keeping its nrow consistent

2010-04-17 Thread Henrique Dallazuanna
Try this indeed of as.matrix(...) : B <- B[-1,, drop = FALSE] On Sat, Apr 17, 2010 at 3:25 PM, wrote: > After some headache with debugging my script, I finally isolated the problem taht I am going to illustrate in the following example. > I expected matrix nrow to decrease consistently till 1.

Re: [R] how to remove one row at a time from a matrix keeping its nrow consistent

2010-04-17 Thread Ista Zahn
On Sat, Apr 17, 2010 at 7:25 PM, wrote: > After some headache with debugging my script, I finally isolated the problem > taht I am going to illustrate in the following example. > I expected matrix nrow to decrease consistently till 1. Instead, when the > matrix is left with one row only, its nr

[R] how to remove one row at a time from a matrix keeping its nrow consistent

2010-04-17 Thread mauede
After some headache with debugging my script, I finally isolated the problem taht I am going to illustrate in the following example. I expected matrix nrow to decrease consistently till 1. Instead, when the matrix is left with one row only, its nrow jumps to 2 because the matrix gets transposed.