I have a dataset in excel/ txt file with 65 columns and 300000 rows. What will be the best way to switch columns and rows. It cannot be done in excel. I tried using R t()
it also does not do the trick.
any suggestion?
Thanks
I have a dataset in excel/ txt file with 65 columns and 300000 rows. What will be the best way to switch columns and rows. It cannot be done in excel. I tried using R t()
it also does not do the trick.
any suggestion?
Thanks
I have a blog post containing Python and Perl code for carrying out a transpose on tab-delimited files. In the post, I also linked to a tool called datamash, which can carry out a transpose. Here's the URL: http://davetang.org/muse/2014/09/09/transpose-tool/.
Here's an elegant and fast method in awk: http://stackoverflow.com/questions/1729824/transpose-a-file-in-bash
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
t()
works on at least some data.frames (and indeed you can transpose sheets in excel, though I'd keep a 300K row sheet out of excel if I were you!). So what error messages to you get when you try to do this transposition?Here is so far I have used-
It is not changing the rows and columns and does not throw any error
You need to set the result when transposing.
will work.
My bad.
Thanks it worked