[R] Importing from Fortan

2011-10-10 Thread Spartina
Hello all, how do I import a Fortran file (f3.1) into one column in R? I've tried this (I'm a total beginner as you can see): > FortranData<-read.fwf("C:\\Users\\format3_1.txt",rep(3,20)) Warning message: In readLines(file, n = thisblock) : incomplete final line found on 'C:\Users\format3_1.tx

Re: [R] Nearest neighbour in a matrix

2011-10-01 Thread Spartina
Hi, sorry for the late reply. I just wanted to thank both of you for your answers. They were helpful and also thank you for mentioning the website that has the tutorials which is a most helpful resource. Cheers, Léa -- View this message in context: http://r.789695.n4.nabble.com/Nearest-neighbou

[R] Nearest neighbour in a matrix

2011-09-26 Thread Spartina
Hello all, I am brand new to R and doing an exercise for a class. I need to find the nearest neighbour for points in the following matrix: > DistanceMatrix x1 x2 x3 x4 x5 [1,] 0.00 2.828427 1.581139 2.236068 2.00 [2,] 2.828427 0.00 1.581139 4.123106

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. ___

[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. Di