s-news
[Top] [All Lists]

Wide to long format

To: s-news@lists.biostat.wustl.edu
Subject: Wide to long format
From: GRAHAM LEASK <grahamleask@btopenworld.com>
Date: Sat, 22 Apr 2006 14:19:48 +0100 (BST)
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=btopenworld.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=uzz8UN9HUqZPRl2iGoIksLoRO/yYagdH+6ae6f6sd7Sb83ujhRfXnc8C4WpozYx6geMM+9w4DOjLNnAGvvR4dzfyN+o38AiuLv8kkG7dYoUk31k532jcSCoYeTZJMfWnZrDhav4/KmVzGHMKKS88LFxlpSstZLvryPRVoV5v52Y= ;
 
 
I have a file where "firms" is the column containing the row names and I have ten separate "year" columns each with the data for that year.
 
How can I most simply convert this "wide format" data into long format i.e. ten consecutive repetitions of the row names, aligned to one column of data and a second column - categorical variable - identifying the year which that data corresponds to.
 
Any help would be greatly appreciated
 
Kind regards
 
 
Graham
<Prev in Thread] Current Thread [Next in Thread>