
I am using acf() to get the autocorrelations of a time series.  It works but
I want to then get the autocorrelations into a simple list of numbers.


> x <- acf(price_changes, lag.max = 12,type = "correlation",plot = FALSE)
> x

Autocorrelations of series ‘price_changes’, by lag

     0      1      2      3      4      5      6      7      8      9     10    
11     12 
 1.000  0.719  0.572  0.350  0.172 -0.046 -0.178 -0.326 -0.369 -0.339 -0.291
-0.209 -0.150 

> y <- as.list(x)
> y

Autocorrelations of series ‘price_changes’, by lag

     0      1      2      3      4      5      6      7      8      9     10    
11     12 
 1.000  0.719  0.572  0.350  0.172 -0.046 -0.178 -0.326 -0.369 -0.339 -0.291
-0.209 -0.150 


What I want is just a basic vector of numbers but I keep getting this
multidimensional "Autocorrelations of series 'price_changes', by lag" stuff.

I want:

> y
[1] 1.000   0.719   0.572  ....

-- 
View this message in context: http://www.nabble.com/Coercing-data-into-a-simple-array-tp20947264p20947264.html
Sent from the R help mailing list archive at Nabble.com.

	[[alternative HTML version deleted]]

