Re: [R] Trouble creating and adjacency matrix

2011-09-26 Thread Spartina
Hello all, Thanks for your answers! I'll give your suggestions a try later on today. Cheers, Léa -- View this message in context: http://r.789695.n4.nabble.com/Trouble-creating-and-adjacency-matrix-tp3842106p3843660.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Trouble creating and adjacency matrix

2011-09-25 Thread Daniel Malter
x-rnorm(25,1.5,1) dim(x)=c(5,5) x y-ifelse(c(x)1.5,1,0) dim(y)-dim(x) HTH, Daniel Spartina wrote: Hello all, I'm having trouble creating an adjacency matrix. Basically, I need to turn the following distance matrix into an adjacency matrix based on whether values are 1.5 or not. If

[R] Trouble creating and adjacency matrix

2011-09-25 Thread Spartina
Hello all, I'm having trouble creating an adjacency matrix. Basically, I need to turn the following distance matrix into an adjacency matrix based on whether values are 1.5 or not. If they are 1.5, then the returned value should be 0. If they are =1.5, then the returned value should be 1.

Re: [R] Trouble creating and adjacency matrix

2011-09-25 Thread Jorge I Velez
Hi Léa, Try ifelse(DistanceMatrix 1.5, 0, 1) HTH, Jorge On Sun, Sep 25, 2011 at 5:07 PM, Spartina wrote: Hello all, I'm having trouble creating an adjacency matrix. Basically, I need to turn the following distance matrix into an adjacency matrix based on whether values are 1.5 or

Re: [R] Trouble creating and adjacency matrix

2011-09-25 Thread Rolf Turner
See end of message. On 26/09/11 10:07, Spartina wrote: Hello all, I'm having trouble creating an adjacency matrix. Basically, I need to turn the following distance matrix into an adjacency matrix based on whether values are1.5 or not. If they are1.5, then the returned value should be 0. If