[R] need help to convert in to panel data format

Michael Dewey info at aghmed.fsnet.co.uk
Mon Feb 17 13:03:45 CET 2014


At 17:49 16/02/2014, Ramesh Chandra Das wrote:
>Dear All,
>The data format is like this
>   Company  2001 2001 2001 2002 2002 2002 2003 2003 2003 2004 2004 2004  3M
>India Ltd. 1160.2 2082.7 67.1 1094.3 1069.9 221.6 1160.2 2082.7 67.1 1094.3
>1069.9 221.6  A B B India Ltd. 7758 7932.8 698.2 7205.4 7617.3 1272.5 7758
>7932.8 698.2 7205.4 7617.3 1272.5  Aditya Birla Nuvo Ltd. 11871.4 15259.5
>1571.9 10834.1 18851.3 7430.7 11871.4 15259.5 1571.9 10834.1 18851.3
>7430.7  Alstom
>T & D India Ltd. 4182.5 4035.3 -25.4 4279.5 3812.1 770.2 4182.5 4035.3 -25.4
>4279.5 3812.1 770.2  B A S F India Ltd. 3799.9 4194.6 416.1 3420.5 3557.7
>1406.3 3799.9 4194.6 416.1 3420.5 3557.7 1406.3  Balmer Lawrie & Co. Ltd.
>6987.2 7445.8 4.1 7215.4 5750.5 1695.6 6987.2 7445.8 4.1 7215.4 5750.5
>1695.6  Bhilai Engineering Corpn. Ltd. 1501.1 1378.1 152.3 1370.6 1227.4
>175.1 1501.1 1378.1 152.3 1370.6 1227.4 175.1  Bombay Burmah Trdg. Corpn.
>Ltd. 1846.9 1607.6 3.8 1947.5 2411.3 683.4 1846.9 1607.6 3.8 1947.5 2411.3
>683.4  Clariant Chemicals (India) Ltd.
>3346.5 3520.1 512.2 2951.3 2691.9 901.6 3346.5 3520.1 512.2 2951.3 2691.9
>901.6 would some one help to convert into panel data format.

I think you need reshape
?reshape should get you started.

>Thanks and regards
>========================================================
>Ramesh Chandra Das
>Doctoral Student
>Vinod Gupta School of Management
>Indian Institute of Technology, Kharagpur,
>West Bengal, India, PIN - 721 302
>Phone: 91+ 9002883115
>
>         [[alternative HTML version deleted]]

Michael Dewey
info at aghmed.fsnet.co.uk
http://www.aghmed.fsnet.co.uk/home.html




More information about the R-help mailing list