Re: [R] string to list()

2011-11-14 Thread Bert Gunter
Do it in 2 steps: z <- as.list( coef(am)[1:am$arma[2] + am$arma[1]]) names(z) <- paste("ma",seq_along(z), sep="") -- Bert On Mon, Nov 14, 2011 at 10:40 AM, Kevin Burton wrote: > I can get an array of strings for the data that I want using 'paste()' as > follows: > > > > paste('ma', 1:am$arma[2]

[R] string to list()

2011-11-14 Thread Kevin Burton
I can get an array of strings for the data that I want using 'paste()' as follows: paste('ma', 1:am$arma[2], '=', coef(am)[1:am$arma[2] + am$arma[1]], sep='') This results in a vector of strings like: [1] "ma1=1.17760133668255" "ma2=0.649795570407939" "ma3=0.329456750858276" What I