Re: [R] Very simple question about list components

2011-09-09 Thread Clemontina Alexander
Thank you all. And thanks for pointing out I have an lm object, not a list. @ Steve, I knew I wasn't crazy when I saw him type "ans$" in the prompt. I didn't see him hit though. So a special thanks to you for helping me validate my sanity! :-) Tina On Fri, Sep 9, 2011 at 11:08 AM, Steve Liano

Re: [R] Very simple question about list components

2011-09-09 Thread Steve Lianoglou
Hi Clemontina, On Fri, Sep 9, 2011 at 11:01 AM, Clemontina Alexander wrote: > I have a list 'ans' from the following code: > > tt <- rnorm(50) > rr <- rnorm(50) > ans <- lm(rr~tt) > > ans[1] is "$coefficients", ans[2] is "$residuals", ans[3] is > "$effects", ... and so on up to ans[12]. Is there

Re: [R] Very simple question about list components

2011-09-09 Thread Sarah Goslee
> names(ans) [1] "coefficients" "residuals" "effects" "rank" [5] "fitted.values" "assign""qr""df.residual" [9] "xlevels" "call" "terms" "model" And thank you for providing a simple reproducible example. Sarah On Fri, Sep 9, 2011 at 11:01

Re: [R] Very simple question about list components

2011-09-09 Thread Jorge I Velez
Try > names(ans) [1] "coefficients" "residuals" "effects" "rank" [5] "fitted.values" "assign""qr""df.residual" [9] "xlevels" "call" "terms" "model" HTH, Jorge * * On Fri, Sep 9, 2011 at 11:01 AM, Clemontina Alexander <> wrote: > I have a

Re: [R] Very simple question about list components

2011-09-09 Thread R. Michael Weylandt
Try names(ans) Hope this helps, Michael Weylandt On Fri, Sep 9, 2011 at 10:01 AM, Clemontina Alexander wrote: > I have a list 'ans' from the following code: > > tt <- rnorm(50) > rr <- rnorm(50) > ans <- lm(rr~tt) > > ans[1] is "$coefficients", ans[2] is "$residuals", ans[3] is > "$effects", ..

[R] Very simple question about list components

2011-09-09 Thread Clemontina Alexander
I have a list 'ans' from the following code: tt <- rnorm(50) rr <- rnorm(50) ans <- lm(rr~tt) ans[1] is "$coefficients", ans[2] is "$residuals", ans[3] is "$effects", ... and so on up to ans[12]. Is there an easy way to display just these names and not the data they contain? I thought I saw my ad