Thank you all for your help.
Fede
_Fede_ wrote:
>
> Hi all.
>
> I have certain problem with the extraction of data from matrices. I know
> how extract elements from a matrix, but what I would like to do is to
> extract a concrete number, not an element. For example if I have this
> matrix X:
?which
Does something like this help?
which(aa==29)
aa[ -which(aa==29)]
--- _Fede_ <[EMAIL PROTECTED]> wrote:
>
> Hi all.
>
> I have certain problem with the extraction of data
> from matrices. I know how
> extract elements from a matrix, but what I would
> like to do is to extract a
> concr
Try also:
mat[mat==29] <- NA
On 15/02/2008, _Fede_ <[EMAIL PROTECTED]> wrote:
>
> Hi all.
>
> I have certain problem with the extraction of data from matrices. I know how
> extract elements from a matrix, but what I would like to do is to extract a
> concrete number, not an element. For examp
Look this can help you:
mtz<-matrix(1:20,4,5)
> mtz
[,1] [,2] [,3] [,4] [,5]
[1,]159 13 17
[2,]26 10 14 18
[3,]37 11 15 19
[4,]48 12 16 20
> mtz[2,3]
[1] 10
> mtz
[,1] [,2] [,3] [,4] [,5]
[1,]159 13 17
[2,]2
On Fri, 2008-02-15 at 08:10 -0800, _Fede_ wrote:
> Hi all.
>
> I have certain problem with the extraction of data from matrices. I know how
> extract elements from a matrix, but what I would like to do is to extract a
> concrete number, not an element. For example if I have this matrix X:
>
>
Hi all.
I have certain problem with the extraction of data from matrices. I know how
extract elements from a matrix, but what I would like to do is to extract a
concrete number, not an element. For example if I have this matrix X:
[,1] [,2] [,3] [,4]
[1,]3 13 23 33
[2,]9 19
6 matches
Mail list logo