[R] Storing data from a test as a vector or matrix

wwreith reith_william at bah.com
Wed May 4 17:31:47 CEST 2011


SA gives the output:

Response IPS1 :
                Df Sum Sq Mean Sq F value   Pr(>F)    
as.factor(WSD)   3 3.3136 1.10455  23.047 5.19e-12 ***
Residuals      129 6.1823 0.04793                     
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 
.
.
.
There are 11 more just like this output. Just increment IPS1 to IPS2, etc.


Goal: save "3 3.3136 1.10455  23.047 5.19e-12" as a vector.


Str(SA) gives the output:

str(SA)					
> str(SA)					
List of 12					
" $  Response IPS1 :Classes 'anova' and 'data.frame':	2 obs. of  5
variables:"					
  ..$ Df     : num [1:2] 3 129					
  ..$ Sum Sq : num [1:2] 3.31 6.18					
  ..$ Mean Sq: num [1:2] 1.1045 0.0479					
  ..$ F value: num [1:2] 23 NA					
  ..$ Pr(>F) : num [1:2] 5.19e-12 NA					


There are several more but they are just repeats of this one only with IPS2,
IPS3,...

The command:

> SA1<-as.vector(SA$"Reponse IPS1")

Returns 

>NULL

As do several variations I have tried. Any ideas. 

--
View this message in context: http://r.789695.n4.nabble.com/Storing-data-from-a-test-as-a-vector-or-matrix-tp3495626p3495950.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list