This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Transpose/merge


Hi all,

I am not that much skilled in C/C++ programming, but I
am eager to learn more about it. 

I have a problem to manipulate the following data set.
I hope that I may get a help from you guys!

I am looking for an algorithm that  transpose(merge) a
data set by a variable. The data set is a two
dimensional x(m,n). If the the value of the first
column is equal to the value of the previous row (m,1
=m-1,1)  then  merge the variables of ( m, 2-n) to the
first row.

May be an example of a data set explain in a better
way.

obs   v1 v2 v3
 1    11 12 13 
 1    21 22 23
 2    22 23 24
 3    44 45 46   
 3    55 54 56
 3    66 65 66

The transposed(merged) data file would look like

1    11 12 13 21 22 23
2    22 23 24
3    44 45 46 55 54 56 66 65 66  


Any help is highly appreciated in advance
Ashe



__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]