[R] manipulate a matrix

Jon Hak Jon_Hak at natureserve.org
Mon Jun 25 16:58:52 CEST 2007


I have read everything I can find on how to manipulate a results matrix in R and I have to admit I'm stumped.  I have set up a process to extract a dataset from ArcGIS to compute a similarity index (Jaccards) in Vegan.  The dataset is fairly simple, but large, and consists of rows = sample area, and columns = elements.  I've been able to view the results in R, but I want to get the results out to a database and a matrix that is 6000-rows x 6000-columns can be very difficult to manipulate in Windows XP.  I would to rotate the matrix so that the output would look like the old condensed format in programs like Conoco.  Ideally, I would like format to look something like this;


Site-row Site-col Jaccard
1	    1		1
1	    2  	.9
1	    3  	.6
2	    1  	.9
2    	    2       1
2	    3       .75

Thanks for any help,




***********************************************************
John Hak
Senior GIS Analyst/Sr. Ecologist
NatureServe
4001 Discovery Drive 
Boulder, CO 80303
(703) 797-4809

There is perhaps no better demonstration of the folly of human conceits than this distant image of our tiny world. To me, it underscores our responsibility to deal more kindly with one another, and to preserve and cherish the pale blue dot, the only home we've ever known. --Carl Sagan
 



More information about the R-help mailing list