나중에 분할된 모든 열의 이름을 수동으로 바꾸지 않고 "텍스트를 열로" 방법을 어떻게 사용합니까?
안녕하세요,
이를 수행하는 몇 가지 방법이 있습니다.
스크립팅:
Names Default To Here(1);
dt = open("ExTable.jmp");
//find column position of column to be split
columnPosition = contains(dt << get column names(string), "CombinedFields");
//determine original number of columns
originalNumCols = ncol(dt);
//new names here...
newColNames = {"Model", "Country", "Type"};
//split the column
dt << Text to Columns( columns( :CombinedFields ), Delimiters( "," ) );
//how many new columns are there?
numColsCreated = ncol(dt) - originalNumCols;
//loop through the new columns, using original column's position as an offset, and change names
for(i = 1, i<=numColsCreated, i++,
column(dt, columnPosition + i) << set name(newColNames[i])
);
잘라내기 및 붙여넣기:
새 열 이름을 테이블의 단일 열에 배치하고 모두 선택하고 CTRL-C(Mac의 경우 CMD-C)로 복사합니다.

Text To Columns 작업을 수행한 다음 새 열을 선택하고 CTRL-V를 눌러 새 이름을 붙여넣습니다.


사용 열 이름 다시 코딩
먼저 Text To Columns를 사용하여 관심 있는 열을 분할합니다.
다음, 열 > 열 이름 > 열 이름 다시 코딩...을 선택합니다. 메인 메뉴에서.

원하는 대로 새 열 이름을 입력한 다음 레코딩 버튼을 눌러 완료합니다.

표와 스크립트가 첨부되어 있습니다.
건배,
브래디