Re: [R] Squaring one column of data

2009-06-12 Thread baptiste auguie
Kenny Larsen wrote: Hi, A fairly basic problem I think, here although searching the inetrnet doesn't seem to reveal a solution. I have a dataset with two columns of real numbers. It is read in via read.table. I simply need to square the data in the second column and then plot it. I have tried ex

Re: [R] Squaring one column of data

2009-06-12 Thread Kenny Larsen
Have sorted it, it was simple, for anyone else who needs it: z[2] <- z[2]*z[2] squares the second column of a data table and writes it back to the second column Kenny Kenny Larsen wrote: > > Hi, > > A fairly basic problem I think, here although searching the inetrnet > doesn't seem to reve

[R] Squaring one column of data

2009-06-12 Thread Kenny Larsen
Hi, A fairly basic problem I think, here although searching the inetrnet doesn't seem to reveal a solution. I have a dataset with two columns of real numbers. It is read in via read.table. I simply need to square the data in the second column and then plot it. I have tried extracting the second c