JSL을 사용하여 데이터 테이블의 일부를 행과 열로 업데이트안녕하세요, 죄송합니다. 몇 시간 동안 인터넷 검색을했는데 어떻게해야할지 모르겠습니다. 나는 최선을 다할 것이지만 내 질문을 공식화하는 방법을 모르겠습니다. 그냥 정말 화가 났고 지금 나에게 다가가는 것입니다. 마지막으로 그런 단순한 일이 그렇게 복잡 할 수 있습니다. 결국 JMP는 일부를위한 것이지 다른 것을위한 것이 아니라는 것을 알고 있습니다. 파이썬에서 이것은 나에게 매우 쉬울 것입니다. 그러나 나는 그것이 모두 경험에 관한 것이라고 생각합니다. 상해에 모욕을 가하지 마십시오.
데이터 테이블의 하위 집합을 새 데이터로 바꾸고 싶습니다. 대상 행과 대상 열, 이전 테이블과 새 데이터가 있습니다. 이를 수행하는 구문은 무엇입니까?
감사합니다.
남자 이름
데이터 테이블스크립팅Re : JSL을 사용하여 데이터 테이블의 일부를 행과 열로 업데이트다음은 한 테이블의 데이터를 다른 테이블의 값으로 업데이트하는 세 가지 방법입니다.
Names Default To Here( 1 );
// Open Data Table: big class.jmp
// → Data Table( "big class" )
Open( "$SAMPLE_DATA/big class.jmp" );
// Create a table with values to be input
// into the big class table
New Table( "Using Update",
New Column( "Name", character, values( {"JANE", "TIM", "ALICE"} ) ),
New Column( "Height", values( {58, 69, 64} ) ),
New Column( "Weight", values( {88, 100, 120} ) )
);
// Wait for a short time to be able to see the two
// data tables before combining them
Wait( 5 );
// Update data tables
Data Table( "big class" ) << Update( With( Data Table( "Using Update" ) ), Match Columns( :name = :Name ) );
// Update a block of data into the data table
// Create a table to get values from
New Table( "Just Data",
New Column( "A", values( {100, 101, 102, 103} ) ),
New Column( "B", values( {90, 91, 92, 93} ) )
);
// Wait for a short time to be able to see the two
// data tables before combining them
Wait( 5 );
dt = Data Table( "big class" );
dt2 = Data Table( "Just Data" );
dt[3 :: 6, 4 :: 5] = dt2[1 :: 4, 1 :: 2];
// One last simple way to move data
dt:age[2] = dt2:a[4];Re: JSL을 사용하여 행 및 열별로 데이터 테이블의 일부 업데이트안녕 마이클,
테이블 작업에 일반적으로 사용되는 구문을 설명하기 위해 몇 달 전에 작성한 스크립트를 첨부했습니다. 체크아웃할 때 결과를 볼 수 있도록 로그를 켜고 한 번에 한 줄씩 실행하십시오. 순서가 어긋나면 이전에 실행한 코드에 의존하는 작업을 수행하기 때문에 제대로 작동하지 않을 수 있습니다.
특정 경우에는 첨자를 사용하여 테이블 내용을 바꿀 수 있습니다... 이 스크립트를 살펴보고 한 줄씩 실행합니다.
names default to here(1);
//create a 10x10 table of random integers between 1 and 20
dt = As Table( J( 10, 10, Random Integer( 1, 20 ) ) );
//replace column 1 with fibonacci numbers... note 0th row means ALL rows
//note that ` is the transpose operator.
dt[0, 1] = (Round( 1 / Sqrt( 5 ) * ((1 + Sqrt( 5 )) / 2) ^ (1 :: 10) ))` ;
//replace a subbloc of the table with numbers 81-100 in a 4x5 shape
dt[3::6, 4::8] = shape(81::100, 4);
//set a subbloc to all zeros
dt[8::10, 2::4] = 0;
//store a cell's value in a variable
x = dt[2,3];
//store a subbloc in a matrix
mat = dt[4::6, 0];
//set the whole table to missing
dt[0,0] = .;