[R] how to Transpose a dataset

Ben Bolker bolker at ufl.edu
Mon Aug 17 17:25:31 CEST 2009




rajclinasia wrote:
> 
> Hi everyone,
>  
> How to a transpose a R dataset with a specified variable. If possible send
> the code. it will be very helpful for us.
> 

Not clear what "with a specified variable" means.  t(x) will only work with
matrices; if you
have read in an (all-numeric) dataset with read.table or read.csv, you will
need t(as.matrix(x)).

If possible send a short example of (a subset of) your data looks like and
what you want
it to look like after transposition -- that will be very helpful for us ...
-- 
View this message in context: http://www.nabble.com/how-to-Transpose-a-dataset-tp25006768p25008834.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list