Hallo zusammen!
In Pfad C: \ 1 befinden sich viele Datendateien. Sie haben dieselbe Spaltennamenstruktur mit 50 Spalten. So kombinieren Sie mithilfe der JSL-Implementierung die Daten in den Spalten 3 und 5 dieser Dateien in einer neuen Datentabelle.
Einstellung: Das Format des Datentyps von Spalte 3 ist Zeichen, und das Format des Datentyps von Spalte 5 ist numerisch.
Wie Big class.jmp, aber mit 50 Spalten.
Vielen Dank!

Hier ist ein guter Anfang, um zu tun, was Sie wollen. Seien Sie vorsichtig, da die endgültige Tabelle 600.000.000 Zeilen lang ist, wenn Sie die Parameter für die Tabellen angeben, die Sie einlesen möchten. Die Verarbeitung dieser Datenmenge dauert sehr lange.
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>Vielen Dank, Jim!
Ich benutze den JMP Pro 14.
Ich möchte es in einem Skript tun.
Es gibt über 3.000 Dateien mit jeweils über 200.000 Zeilen und 50 Spalten.
Die Details hängen von den Besonderheiten Ihres Anwendungsfalls ab. Aber ich würde damit beginnen, was zu überprüfen Import mehrerer Dateien kann (erfordert JMP 14).