Dear R-helpers,
I apologize for this certainly simple question.
I have the following R lines :
> m = matrix(1:12 , 3 , 4);
> m
[,1] [,2] [,3] [,4]
[1,] 1 4 7 10
[2,] 2 5 8 11
[3,] 3 6 9 12
> m1 = subset(m , m[,2]>=5);
> m1
[1] 2 3 5 6 8 9 11 12
but in fact I would appreciate m1 to be also a matrix,
and thus would like to get :
> m1
[,1] [,2] [,3] [,4]
[2,] 2 5 8 11
[3,] 3 6 9 12
... but I don't find how to do ?
(probably it is very simple ! double shame.).
Thanks for any hint or pointer.
Vincent
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html