안녕, 모두들!
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를 사용한다.
나는 하나의 스크립트로 그것을하고 싶다.
3000 개가 넘는 파일이 있으며 각 파일에는 200,000 개 이상의 행과 50 개의 열이 있습니다.
세부 사항은 유스 케이스의 세부 사항에 따라 다릅니다. 그러나 나는 무엇을 검토하여 시작할 것인가? 여러 파일 가져 오기 할 수 있습니다 (JMP 14 필요).