[R] Multiple Plots and y Axis Labels

2008-07-08 Thread jonboym
Hi, I'm using the mfrow parameter in par() to plot several timeseries with a common time x axis as a sequence of plots one below the other. I reduced the top and bottom margins to zero to get a very nice looking plot but sometimes the labels on the y axes from one plot overlap with the y axis la

Re: [R] Using lm with a matrix?

2008-06-13 Thread jonboym
Many thanks, works great! Charilaos Skiadas-3 wrote: > > Try this: > > lapply( 1:2, function(i) lm( y~x, data=list(x=xdat[,i], y=ydat[,i]) ) ) > > Haris Skiadas > -- View this message in context: http://www.nabble.com/Using-lm-with-a-matrix--tp17708207p17829661.html Sent from the R help m

[R] Using lm with a matrix?

2008-06-07 Thread jonboym
I'm trying to do a linear regression between the columns of matrices. In example below I want to regress column 1 of matrix xdat with column1 of ydat and do a separate regression between the column 2s of each matrix. But the output I get seems to give correct slopes but incorrect intercepts and