Try:

A[A[,2] > 15,]

On Wed, May 12, 2010 at 4:14 PM, Clark Johnston <clarkstat@clarktx.com>wrote:

>
> Is there a way to create a new matrix from and existing matrix with
>
> A
>          [,1]     [,2]
> [1,]      1        13
> [2.]      2        18
> [3,]      3        14
> [4,]      4        20
>
> if(A[,2] > 15)
>
> B
>       [,1]   [,2]
> [1,]   2      18
> [2,]   4      20
>
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/manipulating-a-matrix-tp2196610p2196610.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

	[[alternative HTML version deleted]]

