Re: [R] apply lm() for all the columns of a matrix

2008-04-09 Thread Costas Douvis
ublic Health > Catholic University of Leuven > > Address: Kapucijnenvoer 35, Leuven, Belgium > Tel: +32/(0)16/336899 > Fax: +32/(0)16/337015 > Web: http://med.kuleuven.be/biostat/ > http://www.student.kuleuven.be/~m0390867/dimitris.htm > > > - Original Message --

Re: [R] apply lm() for all the columns of a matrix

2008-04-09 Thread Costas Douvis
ijnenvoer 35, Leuven, Belgium > Tel: +32/(0)16/336899 > Fax: +32/(0)16/337015 > Web: http://med.kuleuven.be/biostat/ > http://www.student.kuleuven.be/~m0390867/dimitris.htm > > > - Original Message - > From: "Costas Douvis" <[EMAIL PROTECTED]>

[R] apply lm() for all the columns of a matrix

2008-04-09 Thread Costas Douvis
Hi all, My question is not really urgent. I can write a loop and solve the problem. But I know that I'll be in a similar situation many more times so it would be useful to find out the answer Is there a fast way to perform linear fit to all the columns of a matrix? (or in the one dimension of a m

[R] how to plot a map on a non-rectilinear grid

2008-03-17 Thread Costas Douvis
Hi everyone I have a matrix (let's say that it contains the values of elevation) and want to plot its values on a map using a function such as image.plot or filled.contour. The problem is that my grid is not rectilinear, it is bended. Here is an example lon<-matrix(0,20,25) lat<-matrix(0,20,25) e

[R] output into an unformatted direct fortran file

2008-01-07 Thread Costas Douvis
Hello everybody Is there a way to output data into a file like the unformatted, direct fortran files? That's the kind that can be opened with: open(30, file='file', format='unformatted', access='direct', rec=1000, convert='big endian') Thank you in advance Kostas Douvis