On May 12, 2010, at 3:14 PM, Clark Johnston wrote:
Is there a way to create a new matrix from and existing matrix with
A
[,1] [,2]
[1,] 113
[2.] 218
[3,] 314
[4,] 420
if()
B
[,1] [,2]
[1,] 2 18
[2,] 4 20
Clark Johnston wrote:
Is there a way to create a new matrix from and existing matrix with
A
[,1] [,2]
[1,] 113
[2.] 218
[3,] 314
[4,] 420
if(A[,2] > 15)
B
[,1] [,2]
[1,] 2 18
[2,] 4 20
It's
Try:
A[A[,2] > 15,]
On Wed, May 12, 2010 at 4:14 PM, Clark Johnston wrote:
>
> Is there a way to create a new matrix from and existing matrix with
>
> A
> [,1] [,2]
> [1,] 113
> [2.] 218
> [3,] 314
> [4,] 420
>
> if(A[,2] > 15)
>
>
Is there a way to create a new matrix from and existing matrix with
A
[,1] [,2]
[1,] 113
[2.] 218
[3,] 314
[4,] 420
if(A[,2] > 15)
B
[,1] [,2]
[1,] 2 18
[2,] 4 20
--
View this message in context:
4 matches
Mail list logo