[R] data management

Uwe Ligges ligges at statistik.tu-dortmund.de
Sun Jan 25 16:53:04 CET 2009


Although the message is rather unreadable, I guess you want to look at 
?reshape.

Uwe Ligges

oscar linares wrote:
> Dear Rxperts,
> 
> I would like to convert the following:
> 
> Study    Study.Name    Parameter    Dest    Src    Form    Value    Min
> Max    FSD
> 1    NT_1-0BF    K(03)    03        A    0.12851    0.00000E+00    10000.
> 0.41670E-01
> 1    NT_1-0BF    L(00,03)    00    03    D    0.36577
> 1    NT_1-0BF    L(00,02)    00    02    D    0.90000
> 1    NT_1-0BF    L(00,04)    00    04    D    0.90000
> 1    NT_1-0BF    P(01)    01        A    0.36577    0.00000E+00    100.00
> 0.36880E-01
> 1    NT_1-0BF    P(02)    02        A    28.269    0.00000E+00    100.00
> 0.58489E-01
> 1    NT_1-0BF    P(03)    03        A    68.144    10.000    1000.0
> 0.27806E-01
> 1    NT_1-0BF    P(05)    05        D    0.90000
> 1    NT_1-0BF    P(31)    31        D    26.316
> 1    NT_1-0BF    P(32)    32        D    29.483
> 1    NT_1-0BF    P(22)    22        D    7.7813
> Study    Study.Name    Parameter    Dest    Src    Form    Value    Min
> Max    FSD
> 1    NT_1-1BF    K(03)    03        A    0.12852    0.00000E+00    10000.
> 0.39727E-01
> 1    NT_1-1BF    L(00,03)    00    03    D    0.36577
> 1    NT_1-1BF    L(00,02)    00    02    D    0.90000
> 1    NT_1-1BF    L(00,04)    00    04    D    0.90000
> 1    NT_1-1BF    P(01)    01        A    0.36577    0.00000E+00    100.00
> 0.35166E-01
> 1    NT_1-1BF    P(02)    02        A    28.280    0.00000E+00    100.00
> 0.55760E-01
> 1    NT_1-1BF    P(03)    03        A    68.134    10.000    1000.0
> 0.26508E-01
> 1    NT_1-1BF    P(05)    05        D    0.90000
> 1    NT_1-1BF    P(22)    22        D    7.7811
> Study    Study.Name    Parameter    Dest    Src    Form    Value    Min
> Max    FSD
> 1    NT_1-2BF    K(03)    03        A    0.12851    0.00000E+00    10000.
> 0.90167E-01
> 1    NT_1-2BF    L(00,03)    00    03    D    0.36575
> 1    NT_1-2BF    L(00,02)    00    02    D    0.90000
> 1    NT_1-2BF    L(00,04)    00    04    D    0.90000
> 1    NT_1-2BF    P(01)    01        A    0.36575    0.00000E+00    100.00
> 0.79794E-01
> 1    NT_1-2BF    P(02)    02        A    23.890    0.00000E+00    100.00
> 0.13385
> 1    NT_1-2BF    P(03)    03        A    76.297    10.000    1000.0
> 0.68931E-01
> 1    NT_1-2BF    P(05)    05        D    0.90000
> 1    NT_1-2BF    P(22)    22        D    7.7815
> 
> To look like the following stata output
> 
>      | study   studyn~e     K3    P1       P2       P3       P5    P11
> P23      P31      P32      P33 |
> 
> |------------------------------------------------------------------------------------------------------|
>   1. |     1      NT_16   .125   .35   35.903   8.6815   .83195     58
> .13793   26.316   4.7181   13.211 |
>   2. |     2       NT_1   .125   .35   23.173   9.4882   .75125   66.7
> .11994   26.316   4.0427    11.32 |
>   3. |     3       NT_2   .125   .35   48.229   7.1296   .68354   66.7
> .11994   26.316   4.9101   13.748 |
>   4. |     4       NT_3   .125   .35   8.0027   15.967   1.1438
> 80        .1   26.316   .37137   1.0398 |
>   5. |     5       NT_4   .125   .35   24.468   4.4256   .65408
> 40        .2   26.316   2.1901   6.1322 |
> 
> |------------------------------------------------------------------------------------------------------|
> 
> Any suggestions for doing this in R?
> 
> Many thanks in advance for your help.
>




More information about the R-help mailing list