Re: [R] Two Noobie questions

2009-01-08 Thread Prof Brian Ripley
]][[2]] [1] -0.04871091 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of AllenL Sent: 06 January 2009 19:48 To: r-help@r-project.org Subject: Re: [R] Two Noobie questions Thanks for your help! I combined the above two to get

Re: [R] Two Noobie questions

2009-01-07 Thread Simon Pickett
this helps. Simon. - Original Message - From: AllenL allen.laroc...@gmail.com To: r-help@r-project.org Sent: Tuesday, January 06, 2009 7:47 PM Subject: Re: [R] Two Noobie questions Thanks for your help! I combined the above two to get the following, which seems to work (if somewhat

Re: [R] Two Noobie questions

2009-01-07 Thread Neil Beddoe
[mailto:r-help-boun...@r-project.org] On Behalf Of AllenL Sent: 06 January 2009 19:48 To: r-help@r-project.org Subject: Re: [R] Two Noobie questions Thanks for your help! I combined the above two to get the following, which seems to work (if somewhat inelegant): int.List-unlist(lapply(lmList

[R] Two Noobie questions

2009-01-06 Thread AllenL
1. I have a list of lm (linear model) objects. Is it possible to select, through subscripts, a particular element (say, the intercept) from all the models? I've tried something like this: List[[1:length(list)]][1] All members of the list are similar. My goal is to have a list of the intercepts

Re: [R] Two Noobie questions

2009-01-06 Thread David Winsemius
On Jan 6, 2009, at 1:50 PM, AllenL wrote: 1. I have a list of lm (linear model) objects. Is it possible to select, through subscripts, a particular element (say, the intercept) from all the models? I've tried something like this: ?coef if your list of models is ml, then perhaps

Re: [R] Two Noobie questions

2009-01-06 Thread AllenL
Thanks for your help! I combined the above two to get the following, which seems to work (if somewhat inelegant): int.List-unlist(lapply(lmList, function(x) {coef(x)[1]}),use.names=FALSE) lmList is my list of lm objects. -Allen David Winsemius wrote: On Jan 6, 2009, at 1:50 PM,