[R] Transpose a dataset

2009-08-18 Thread rajclinasia
Hi Everyone, I have a dataset like this mean sd0% 25% 50% 75% 100% n BODY TEMPERATURE 36.41099 0.4015699 35.1 36.2 36.5 36.7 37.1 89 DIASTOLIC BLOOD PRESSURE 73.60079 9.4656186 50.0 67.0 73.0

Re: [R] Transpose a dataset

2009-08-18 Thread jim holtman
Is this what you want: x mean sd X0. X25. X50. X75. X100. n BODY_TEMPERATURE 36.41099 0.4015699 35.1 36.2 36.5 36.7 37.1 89 DIASTOLIC_BLOOD_PRESSURE 73.60079 9.4656186 50.0 67.0 73.0 80.0 95.0 253 HEIGHT

Re: [R] Transpose a dataset

2009-08-18 Thread S Ellison
Does ??transpose help (for example, leading to ?t for 'transpose') rajclinasia r...@clinasia.com 18/08/2009 05:00:00 Hi Everyone, I have a dataset like this mean sd0% 25% 50% 75% 100% n BODY TEMPERATURE 36.41099

Re: [R] Transpose a dataset

2009-08-18 Thread Rolf Turner
You mean ***transform*** a dataset, not ``transpose''. Transposition is something done to a matrix. If you do not get your terminology straight, no one can help you. You may get some mileage out of the reshape() function; possibly you may need the more elaborate facilities in the reshape

Re: [R] Transpose a dataset

2009-08-18 Thread Eduardo Leoni
## if x is a matrix this should work library(reshape) x - structure(c(36.41099, 73.60079, 171.94, 67.48221, 131.917, 85.17079, 0.4015699, 9.4656186, 9.201167, 11.7657645, 14.4986667, 17.3150434, 35.1, 50, 153.5, 40, 97, 57.3, 36.2, 67, 166.5, 60, 122, 70.9, 36.5, 73, 173, 68, 132, 83.1,