大家好!
路径C:\ 1中有许多数据文件。它们具有相同的列名称结构,包含50列。如何使用JSL实现将这些文件的第3列和第5列中的数据组合到新数据表中。
设置:列3的数据类型的格式为字符,列5的数据类型的格式为数字。
像Big class.jmp一样,但有50列。
谢谢!

这是一个很好的开始做你想要的.......小心,根据你给出的关于你要阅读的表的参数,最终表将是600,000,000行的长度。 处理该数据量需要很长时间。
Names Default To Here( 1 );
// Set the path to the folder to get the files from
// Make sure a "/" is the last character in the path
// Change the value below to the actual path you need to point to
dirPath = "$SAMPLE_DATA/";
// Get all of the files from the folder
allFilesList = Files In Directory( dirPath );
// set the pointer to the final data table to a null value
dt = "";
// Loop across all of the files and concatenate them together
For( i = 1, i <= N Items( allFilesList ), i++,
// Open the file
dtIn = Open( dirPath || allFilesList[i], invisible );
dtIn << run formulas; // make sure all records are run before continuing the process
// In my test case, I make sure there are at least the 5 columns
If( N Cols( dtIn ) >= 5,
// Make sure the 3rd and 5th columns are of the correct type, and give them a standard name
Column( dtIn, 3 ) << data type( character ) << set name( "__3__" );
Try( Column( dtIn, 3 ) << delete property( "formula" ) );
Column( dtIn, 5 ) << data type( numeric ) << modeling type( continuous ) << set name( "__5__" );
Try( Column( dtIn, 3 ) << delete property( "formula" ) );
Wait( 0 );
// Delete all columns except the 3rd and 5th columns
dtIn << delete columns( Index( 6, N Cols( dtIn ) ) );
Wait( 0 );
dtIn << delete columns( 4 );
Wait( 0 );
dtIn << delete columns( {1, 2} );
Wait( 0 );
// If this is the first data table, set the variable dt to point to the data table
If( dt == "",
dt = dtIn,
// If not the first data table, then contatenate it to the first table
Try( dt = dt << concatenate( dtIn, Append to first table( 1 ) ) );
// Close the table just read into JMP since we are done with it
Close( dtIn, nosave );
// This is a check I found I needed to make to insure only the 3rd and 5th columns are left
If( Ncol(dt)>2,
dt<<DELETE columns=""></DELETE>谢谢吉姆!
我使用的是JMP pro 14。
我想在一个脚本中完成它。
有超过3,000个文件,每个文件有超过200,000行和50列。
具体细节取决于您的用例的具体情况。但我首先要回顾一下多个文件导入可以做(需要JMP 14)。