This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Transpose/merge
- From: Gokhan Kisacikoglu <kisa at centropolisfx dot com>
- To: AS225 <sewashm at yahoo dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 28 Oct 2002 09:43:03 -0800
- Subject: Re: Transpose/merge
- Organization: Centropolis Effects, LLC
- References: <20021027185017.11389.qmail@web40405.mail.yahoo.com>
- Reply-to: kisa at centropolisfx dot com
STOP POSTING YOUR HOMEWORK ASSIGNMENTS HERE!!!
AS225 wrote:
>
> 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
>