RE: [R] NA's?

From: Mulholland, Tom <Tom.Mulholland_at_dpi.wa.gov.au>
Date: Thu 31 Mar 2005 - 13:55:55 EST


See upper.tri and lower.tri.

I think that you might also look for specific packages that function using matrices, from what I have seen these often have the capacity to ignore the diagonal or use just the upper or lower triangle. This is not an area that I use very much, but I have seen various posts about different types of matrices and there appears to be quite a lot of code that deals with the range of types and uses. Obvious candidates include the Matrix package, but a search for matrix in all of the CRAN packages brings up a bewildering variety of matrix related functions. You may find it useful to search for the specific type of manipulation that you are attempting.

Tom

> -----Original Message-----
> From: Asha Jayanthi [mailto:ashajayanthi@hotmail.com]
> Sent: Thursday, 31 March 2005 9:22 AM
> To: r-help@stat.math.ethz.ch
> Subject: [R] NA's?
>
>
> I have a large matrix of data .
>
> The size of the matrix ranges from 100 x 100 to 1000 x 1000
>
> Now i have to do computations on that. And should not
> consider the diagonal
> elements.
>
> I tried setting diag(M) = NA and M = na.omit(M).
>
> But this omits all the rows. I only want to omit that
> diagonal elements only
> but consider the whole row.
>
> diag(M) = 0 seems like a good option but this will affect my result.
>
> How to proceed with this. How to just ignore some specific
> values. what if i
> want to consider only the upper / lower triangular matrix
>
> Asha
>
>
> http://adfarm.mediaplex.com/ad/ck/4686-26272-10936-31?ck=RegSe
ll Start your
business.



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Mar 31 14:03:29 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:57 EST