s-news
[Top] [All Lists]

transforming 2D matrix to 4D array

To: s-plus user list <s-news@lists.biostat.wustl.edu>
Subject: transforming 2D matrix to 4D array
From: Xao Ping <xao_ping@yahoo.com>
Date: Wed, 16 Feb 2005 17:40:24 -0800 (PST)
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=rb9bTcyzJXjIAUGbk+y0KACmABUxq/XRJhcd8CgJBTJXYM+qhbc5nuOfa9vPcl8zVI4/dxO2/JlctxBsxdg5nECqGFtXYnC6aMv5ebzInFNu+PaA6qvnbn5ePi4vLW0LbWRTvyGwS3eb1S8KGuvOmhy/DiYGS3SaEG9E+6MAzz8= ;
Dear All:
 
I would appreciate an advice on the following matter. I have a data set organized as a matrix with 20000 rows and 72 columns. The column names represent a chierarchical structure. Namely, there is 6 logically different groups, each containing 12 columns. There are 4 sub-groups within each of these 6 groups, each containing 3 columns. I would like to transform the 2D data matrix into  4D array with dim=c(20000,6,4,3). Is there any smart way to perform this task without resorting to "for" loops?
 
Thank you in advance
 
Xao Ping 
R&R Pharmakinetics
Taiwan
 


Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search. Learn more.
<Prev in Thread] Current Thread [Next in Thread>