Skip to content
Prev 269524 / 398502 Next

matrix into vector with vertex names

Hi Gabor,

Thanks. I will try to figure out the solution you suggest. I found out
about melt() from a discussion forum; it seems to me that
"melt()$value" is similar to "c()", and when I modified the script as
below it 'seems' to be running faster. Anyway in the end I only needed
to use a smaller network so the computation went ok.

y_s <- melt(y_s)[c(upper.tri(y_s)),]  #new code

y_s <- melt(y_s)[melt(upper.tri(y_s))$value,] #old code

The reason I needed three columns was for later statistical analysis
for which such a format was necessary.

Best regards,
Joe.
On Thu, Aug 18, 2011 at 12:47 PM, G?bor Cs?rdi <csardi at rmki.kfki.hu> wrote: