[R] multiple lines on multiple plots

2011-04-12 Thread James Annan
I'm sure this must be trivial, but I'm a novice with R and can't work out how to handle the axes when I am constructing multiple plots on a page and try to return to a previous one to put multiple data sets it. A simple example: --- x<- 1:10 y<- (1:100)*3 par(mfcol=c(2,1)) plot(x) plot(y) par(

Re: [R] multiple lines on multiple plots

2011-04-12 Thread James Annan
t the dimensions of all the data you want to plot is a reasonable way to go. On Tue, Apr 12, 2011 at 9:30 AM, James Annan wrote: I'm sure this must be trivial, but I'm a novice with R and can't work out how to handle the axes when I am constructing multiple plots on a page and try to retu

Re: [R] multiple lines on multiple plots

2011-04-18 Thread James Annan
Thanks! I'd seen this sort of trick mentioned in places, but didn't twig what it did. This is exactly what I was looking for. James On 19/4/11 7:04 AM, Greg Snow wrote: tmp1<- par('usr') -- James D Annan jdan...@jamstec.go.jp Tel: +81-45-778-5618 (Fax 5707) Senior Scientist, Research Instit

[R] Simple lm/regression question

2012-02-05 Thread James Annan
I am trying to use lm for a simple linear fit with weights. The results I get from IDL (which I am more familiar with) seem correct and intuitive, but the "lm" function in R gives outputs that seem strange to me. Unweighted case: > x<-1:4 > y<-(1:4)^2 > summary(lm(y~x)) Call: lm(formula = y ~

Re: [R] Simple lm/regression question

2012-02-06 Thread James Annan
On 6/2/12 19:36 , peter dalgaard wrote: Actually, I think the issue is slightly different: IDL assumes that the errors _are_ something (notice that setting measure_errors to 1 is not equvalent to omitting them), R assumes that they are _proportional_ to the inverse weights Yes, I think this i