Re: [R] remove 0 and NA values

2015-07-14 Thread Daniel Nordlund
On 7/13/2015 6:02 PM, Lida Zeighami wrote: Hi Dan, Thanks for reply, Sorry the format of matrix is ruiend! Yes, this matrix is 6×6 but my orginal matrix is so biger than this!! No, I don't think so your code do that for me! I want to remove the columns which the sum of their values are equal

[R] remove 0 and NA values

2015-07-13 Thread Lida Zeighami
Hi there, I have a matrix which its elements are 0, 1,2,NA I want to remove the columns which the colsums are equal to 0 or NA and drop these columns from the original matrix and create the new matrix for the nonzero and NA value? (I think I have consider na.rm=True and remove the colums with