Hi everybody,
I have files with multiple columns and I want to create, for each of these files, as many files as there are columns. I have attached one example file with 31 columns (3000 lines per column) and I would like to obtain 31 distinct files (each file corresponding to one column).
Thanks for the help,
Paul
Thanks txnelson,
I will also test your script, but at least the function in the Table menu is a easy way to do it
This is an easy task
1. Stack all of the columns in the data table
Tables==>Stack
2. The subset the new stacked table selecting the "Subset By" checkbox
Tables==>Subset
It will create one table for each level
Here is a script of the same actions
Names Default To Here( 1 );
dt = Current Data Table();
dt2 = dt << Stack(
columns(
:Name( "1" ),
:Name( "2" ),
:Name( "3" ),
:Name( "4" ),
:Name( "5" ),
:Name( "6" ),
:Name( "7" ),
:Name( "8" ),
:Name( "9" ),
:Name( "10" ),
:Name( "11" ),
:Name( "12" ),
:Name( "13" ),
:Name( "14" ),
:Name( "15" ),
:Name( "16" ),
:Name( "17" ),
:Name( "18" ),
:Name( "19" ),
:Name( "20" ),
:Name( "21" ),
:Name( "22" ),
:Name( "23" ),
:Name( "24" ),
:Name( "25" ),
:Name( "26" ),
:Name( "27" ),
:Name( "28" ),
:Name( "29" ),
:Name( "30" ),
:Name( "31" )
),
Source Label Column( "Label" ),
Stacked Data Column( "Data" )
);
dt2 << Subset( By( :Label ), All rows, Selected columns only( 0 ), columns( :Data ) );