Re: [R] help on establishing a matrix

2008-01-31 Thread Jim Lemon
Gator Connection wrote: > I am a beginner and this is a naive question. > I have the following data set. > row column height > 1 2 96 > 3 7 67 > 9 25 77 > .. > I have a matrix of 50*100 data points and about 60% of them are zeros. > I want to put the height data into the matrix according to the

Re: [R] help on establishing a matrix

2008-01-30 Thread Henrique Dallazuanna
Perhaps like this: diag(mat[data$row, data$column]) <- data$height On 29/01/2008, Gator Connection <[EMAIL PROTECTED]> wrote: > > I am a beginner and this is a naive question. > I have the following data set. > row column height > 1 2 96 > 3 7 67 > 9 25 77 > .. > I have a matrix of 50*100 d

[R] help on establishing a matrix

2008-01-30 Thread Gator Connection
I am a beginner and this is a naive question. I have the following data set. row column height 1 2 96 3 7 67 9 25 77 .. I have a matrix of 50*100 data points and about 60% of them are zeros. I want to put the height data into the matrix according to their row and column numbers. does anybody