[R] Transpose a dataset

rajclinasia raj at clinasia.com
Tue Aug 18 06:00:00 CEST 2009


Hi Everyone,

I have a dataset like this

                                      mean         sd    0%       25%   50%      
75%  100%   n
BODY TEMPERATURE          36.41099  0.4015699  35.1  36.22222  36.5 
36.66667  37.1  89
DIASTOLIC BLOOD PRESSURE  73.60079  9.4656186  50.0  67.00000  73.0 
80.00000  95.0 253
HEIGHT                   171.94000  9.2011670 153.5 166.50000 173.0
176.25000 190.0  20
PULSE RATE                67.48221 11.7657645  40.0  60.00000  68.0 
75.00000  97.0 253
SYSTOLIC BLOOD PRESSURE  131.91700 14.4986667  97.0 122.00000 132.0
140.00000 185.0 253
WEIGHT                    85.17079 17.3150434  57.3  70.90000  83.1
100.00000 122.5  89

now i want to transpose this dataset like

BODY TEMPERATURE  mean 36.41099
                              sd     0.4015699
                              0%    35.1
                              25%  36.222
                              50%  36.5
                              75%  36.667
                              100% 37.1
                              n        89

DIASTOLIC BLOOD PRESSURE  mean
                                          sd
                                          0%
                                          25%
                                         50%
                                         75%
                                         100%
                                          n
                                                       etc.
if possible please send me the code. it will be very helpful us.

Thanks in Advance.

-- 
View this message in context: http://www.nabble.com/Transpose-a-dataset-tp25018071p25018071.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list