Skip to content

print points from a huge matrix

3 messages · Bing Zhang, Roger Bivand, Thomas W Blackwell

#
Hi All,

I have a 8000*8000 matrix and I want to print out a file with the row name, 
column name and the value for those point with values satisfying a condition. 
I tried using a for loop, however, it took me forever to get the result. Is 
there a fast way to do this? Thanks!

Bing

---------------------------------
1060 Commerce Park
Oak Ridge National Laboratory
P.O. Box 2008, MS 6480
Oak Ridge, TN 37831-6480
Phone: 865-241-0761
Email: zhangb at ornl.gov
#
On Tue, 12 Aug 2003, Bing Zhang wrote:

            
(for your condition) should do it. My matrix is a bit smaller though, but 
it goes quite fast. If you need the row/col names, you'll want to make 
some other structure than the cbind (as a data frame with character 
columns).

  
    
#
I would use  which(),  then subscript the row names and
column names with appropriate columns from  which().
See  help("which"),  help("Extract"),  help("rownames").

-  tom blackwell  -  u michigan medical school  -  ann arbor  -
On Tue, 12 Aug 2003, Bing Zhang wrote: