Hello, I computed acf() and have an array as output. now I would like to have only one matrix or data frame (not yet familiar with the nomenclature) extracted from this array. or even only the first row of each matrix. the first part of my data "test" is called $acf ,1 , , 1 , , 2 1, , ... ... 2, , .. ... I tried several names but nothing wants to work, I only get the message: name not recognized. any idea? thanks Martin -- Martin Wegmann Department of Animal Ecology and Tropical Biology Zoology III, Biocenter Am Hubland 97074 W?rzburg Germany 0931/888-4378 wegmann at biozentrum.uni-wuerzburg.de m.wegmann at web.de
Have you tried the following: tst <- acf()... tst$acf ??? hope this helps. spencer graves Martin Wegmann wrote:> Hello, > > I computed acf() and have an array as output. now I would like to have > only one matrix or data frame (not yet familiar with the nomenclature) > extracted from this array. or even only the first row of each matrix. > the first part of my data "test" is called > $acf > ,1 > , , 1 , , 2 > 1, , ... ... > 2, , .. ... > > I tried several names but nothing wants to work, I only get the message: > name not recognized. > > any idea? thanks Martin > > -- > Martin Wegmann > Department of Animal Ecology and Tropical Biology > Zoology III, Biocenter > Am Hubland > 97074 W?rzburg > Germany > 0931/888-4378 > wegmann at biozentrum.uni-wuerzburg.de > m.wegmann at web.de > > > > ------------------------------------------------------------------------ > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Martin Wegmann wrote:> > Hello, > > I computed acf() and have an array as output. now I would like to have > only one matrix or data frame (not yet familiar with the nomenclature) > extracted from this array. or even only the first row of each matrix. > the first part of my data "test" is called > $acf > ,1 > , , 1 , , 2 > 1, , ... ... > 2, , .. ...It look's different, doesn't it? $acf , , 1 [,1] [,2] [1,] ...> I tried several names but nothing wants to work, I only get the message: > name not recognized. > > any idea? thanks MartinSince it's an array (obviously inside a list, say L), you can index is like an array: L$acf[,,1] # for the first matrix of the third dimension L$acf[,1,] # for the first matrix of the second dimension # in other words: all 1st columns L$acf[4,,] # for the fourth matrix of the first dimension # in other words: all 4th rows See the manuals for details on indexing arrays. Uwe Ligges