Swapping rows and columns in a table

I have all my data imported in a big table containing 2198 columns and 395 rows.
The columns are automatically named as wave0, wave1, wave2,...

How do i swap the rows and columns in the table?

I've read some posts in the forum suggesting to use MatrixTranspose in the command line, but I couldn't find how to use this operation.

Thanks for the help!!

If your table represents a single two-dimensional wave, then you can use
MatrixTranspose myTwoDWave
But if your table represents 2198 individual waves, that won't work. For that, add this to your main Procedure window (Windows->Procedure Windows->Procedure Window):
#include <Transpose Waves In Table>
When you close the Procedure window, you will find a new item in the Table menu, Transpose Waves in Top Table. Selecting that will put up a simple dialog.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
You can use the Transpose Waves in Table procedure file:
1. Choose Windows->Help Files->WM Procedures Index.
2. Choose Edit->Find and find "transpose" (without the quotes).
3. Click the page icon (the one without the X). This #includes the file - open the procedure file to see the #include statement.
4. Activate the table window and choose Table->Transpose Waves in Table.

BUT . . .

It is likely that this is the wrong approach. You should load the data into a 2D wave and then use MatrixTranspose. If the data is in a text file you can use the Load Into Matrix checkbox in the Load Waves dialog (Data->Load Waves->Load Waves).

You can also use the Concatenate operation to concatenate the 2198 waves into one 2D wave. To do this you will need to create a semicolon-separated string containing the names of the 2198 waves. You can do this using WaveList. For example:
String list = WaveList("*", ";", "WIN:Table0")  // NOTE: Replace Table0 with the name of your table
Concatenate/O waveList, matrixWave
MatrixTranspose matrixWave

My table represented the 2198 individuals and this inclusion in the procedure window did work!!

Thanks a lot!

:D

johnweeks wrote:
If your table represents a single two-dimensional wave, then you can use
MatrixTranspose myTwoDWave
But if your table represents 2198 individual waves, that won't work. For that, add this to your main Procedure window (Windows->Procedure Windows->Procedure Window):
#include <Transpose Waves In Table>
When you close the Procedure window, you will find a new item in the Table menu, Transpose Waves in Top Table. Selecting that will put up a simple dialog.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com