[R] apply for list or list -> array

From: Ahn ChaeHyung <cahn88_at_hotmail.com>
Date: Tue 19 Sep 2006 - 01:32:57 GMT


Dear all,

I have the following list, "aa", composed of two 3*3 tables. I would like to use "apply" function to summarize it, but "apply" cannot handle "list". I want to do it without using any interation.

  1. Is there any function like "apply" for list?
  2. Is there any way to transform that "list" to a 2*3*3 "array"?

thanks

cahn



>aa
[[1]]

     [,1] [,2] [,3]
[1,] 1 3 1
[2,] 2 0 1
[3,] 1 1 0

[[2]]

     [,1] [,2] [,3]
[1,] 1 3 1
[2,] 2 0 1
[3,] 1 1 0

I would like to avoid any iteration



Ahn, Chaehyung (cahn) Ph.D.
Alpha-Gamma Technologies Inc.
My Home: http://blog.naver.com/cahn88

R-help@stat.math.ethz.ch 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. Received on Tue Sep 19 18:28:55 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 19 Sep 2006 - 09:30:05 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.