search for: mana01

Displaying 1 result from an estimated 1 matches for "mana01".

Did you mean: kanak1
2008 Jan 02
2
Seeking a more efficient way to read in a file
...ne number, the third row two numbers, etc. In general, row k+1 contains k numbers; the matrix has 3000 rows, so the file has 3001 rows. The file has variable length records, so each row ends with its last piece of data. I read in the file and produced the full symmetric matrix as follows: > mana01 <- scan( file = "C:/mat.dat", sep = "\t", nlines = 1, what = "character" )Read 3000 items> nco <- length( mana01 )> malt <- matrix(0, nrow = nco, ncol = nco )> colnames( malt ) <- mana01> rownames( malt ) <- mana01> for ( i in 1:3000 ) { m...