Skip to content
Back to formatted view

Raw Message

Message-ID: <457808B5.7020902@gmx.de>
Date: 2006-12-07T12:27:33Z
From: Philip Leifeld
Subject: incidence and adjacency matrix conversion
In-Reply-To: <815b70590612051417ga74d036g12822d94e7ec8189@mail.gmail.com>

Thanks, David. I tried converting my rectangular matrix to a network 
object and then back to a square matrix. This works for a small 
artificial dataset (e.g. 2x5), but when I try this on my 1790x45 or 
transposed 45x1790 matrix, R keeps working for a couple of minutes and 
then crashes completely without having saved any data first. I assume 
something is wrong with my data?

Cheers
Philip

David Barron wrote:
> I think you can do this using the network package.  Look at the
> as.network.matrix and as.matrix.network functions, for example.
> 
>> how can I convert an m x n incidence matrix into an m x m adjacency
>> matrix or an n x n adjacency matrix? The current matrix contains binary
>> data, hence the new matrix would contain counts of common occurrences.