Entering edit mode
9.3 years ago
I have a gene expression dataset in Excel/CSV file with 200 columns and 22,000 rows. What will be the best way to switch columns and rows. (This cannot be done in Excel as it supports maximum ~ 16,000 columns)
I want my output as CSV file so that I can load it in Weka.
I don't know programming...So it would be good to know if there is any available tool for this
Hi NicoBxl... I tried this with a small dataset , it seem to work fine...but I guess there are some issues working with such large dataset ..it gives some error
200 x 22,000 should work perfectly ;) What is the amount of RAM you have?
My laptop has 4GB RAM
should work
Tried..
Giving output like this...confused
Note one little quirk of read.table, it expects the header row to have one less entry than the rest of the file, so if you have a header for the first column, it's going to behave strangely. Also note that you might need to manually add a space to the header after you use write.table, or the header names might not match columns correctly.
Also how do I export the transposed data from R to my desktop as a CSV file?
write.table(b,"out.txt",sep="\t",quote=F)
Tried this code, but its exporting the original file but not the transposed one
Dear NicoBxl,
how to change in the structure and the data types of the data frame after the transposition?
Better rewrite a new thread for your question in order to be more specific.