分割されたすべての列の名前を後で手動で変更せずに、「テキストを列に」方法を使用するにはどうすればよいでしょうか?
やあ、
これを行うにはいくつかの方法があります。
スクリプト:
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])
);
カット&ペースト:
新しい列名をテーブルの 1 つの列に配置し、それらをすべて選択して、CTRL-C (Mac では CMD-C) でコピーします。

Text To Columns 操作を実行してから、新しい列を選択し、CTRL-V を押して新しい名前を貼り付けます。


使用する列名の再コード化
まず、Text To Columns を使用して、対象の列を分割します。
次、 [列] > [列名] > [列名を再コード化...] を選択します。メインメニューから。

必要に応じて新しい列名を入力し、再コード化ボタンをクリックして終了します。

表とスクリプトが添付されています。
乾杯、
ブレイディ