On Sep 29, 2010, at 14:25 , Dennis Murphy wrote:

> 
> test.summary[[1]][, 5][1]
> 
> You mean that wasn't obvious?   :)

Worse, it doesn't actually work...

> test.summary <- summary(npk.aovE)
> test.summary[[1]][, 5]
Error in `[.default`(test.summary[[1]], , 5) : 
  incorrect number of dimensions
> test.summary$"Error: block"[[1]][, 5]
[1] 0.5252361        NA
> test.summary[[1]][[1]][, 5]
[1] 0.5252361        NA

I.e., you need an extra list extraction operator. The data structure goes

List of 2
 $ Error: block :List of 1
  ..$ :Classes ‘anova’ and 'data.frame':        2 obs. of  5 variables:
  .. ..$ Df     : num [1:2] 1 4
  .. ..$ Sum Sq : num [1:2] 37 306
...
 and the intermediate list has class ("summary.aov","listof"). I believe the 
point is that you can have a matrix LHS and get a table for each of its columns.

-- 
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd....@cbs.dk  Priv: pda...@gmail.com

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to