General Related Questions
Could someone please point me to functions / methods to get the dimension sizes of a multidimension list or datastructure in R?
It would also be useful to know ways to access individual elements within this bigger datastructure?
Questions on Sample Input and Output Data Below
The Input data is converted to output data using this command:(related question below):
lst <- lapply(split(df2[-1], df2$Column_Zero), function(x)
acast(x, Column_Two~Column_One,value.var="Column_Three"))
- How many matrices are created?
- How to access the name of each sub matrix that is created?
- How many columns each sub matrix has?
- How many rows each sub matrix has?
- Which sub matrix has the maximum / minimum number of columns / rows?
Input Data:
Column_Zero, Column_One, Column_Two, Column_Three
XX,A, 1, 4
XX,A, 2, 3
XX,A, 3, 77
XX,B, 1, 44
XX,B, 2, 32
XX,B, 3, 770
XX,C, 1, 43
XX,C, 2, 310
XX,C, 3, 68
YY,A1, 1, 4
YY,A1, 2, 3
YY,A1, 3, 77
YY,B1, 1, 44
YY,B1, 2, 32
YY,B1, 3, 770
YY,C1, 1, 43
YY,C1, 2, 310
YY,C1, 3, 68
YY,D2, 1, 4
YY,D2, 2, 5
YY,D2, 3, 6
--------- And so on -----
Output Data:
------ Data Table one ------
A, B, C
4, 44, 43
3, 32, 310
77, 770, 68
------ Data Table Two ------
A1, B1, C1, D2
4, 44, 43,4
3, 32, 310,5
77, 770, 68,6
------ and so on -----
Related Question: This comes up in the related question, where we are splitting a data table and reshaping it. So it becomes important to know how big the smaller data structures / matrices or data tables are.
Please let me know if anything is not clear or if you need any further information.