From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30719 invoked by alias); 28 Oct 2002 17:39:43 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 30690 invoked from network); 28 Oct 2002 17:39:42 -0000 Received: from unknown (HELO mail.centropolisfx.com) (64.70.30.98) by sources.redhat.com with SMTP; 28 Oct 2002 17:39:42 -0000 Received: from centropolisfx.com (jupiter.centropolisfx.com [172.20.2.83]) by mail.centropolisfx.com (8.11.3/8.11.3) with ESMTP id g9SHh3v2014042; Mon, 28 Oct 2002 09:43:03 -0800 (PST) Message-ID: <3DBD7727.148F1708@centropolisfx.com> Date: Mon, 28 Oct 2002 09:39:00 -0000 From: Gokhan Kisacikoglu Reply-To: kisa@centropolisfx.com Organization: Centropolis Effects, LLC X-Accept-Language: en MIME-Version: 1.0 To: AS225 CC: gcc-help@gcc.gnu.org Subject: Re: Transpose/merge References: <20021027185017.11389.qmail@web40405.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-10/txt/msg00348.txt.bz2 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 >