jsl を使用して 1 列の文字列を解析するにはどうすればよいですか?jslを使用して列「result」のデータを区切り文字「|」で分割したいと考えています。新しい列「PIN」と「値」に追加します。親切に助けてください、よろしくお願いします
添付ファイルを参照してください

新しいテーブル

自動化とスクリプト作成Re: jslを使用して1列の文字列を解析するにはどうすればよいですか?- Replace the Stack code with this
// Get all of the column names
resultList = dt << get column names();
// Only the columns Result 2 thru Result N are to be
// stacked, so remove the first 3 columns from the list
remove from(resultList,1,3);
// Use a multiple series stack to stack the data
dtStack = dt << Stack(
columns( resultList ),
Source Label Column( "Label" ),
Stacked Data Column( "Data" ),
"Non-stacked columns"n( Keep( :Unit#, :Result 1 ) ),
Number of Series( 2 ),
Output Table( "Untitled 20.jmp" )
);
- 時間をかけて、「ヘルプ」プルダウン メニューの下にある JMP ドキュメント ライブラリにあるスクリプト ガイドを読んでください。
Re: jslを使用して1列の文字列を解析するにはどうすればよいですか?// Use a multiple series stack to stack the data
dtStack = dt << Stack(
columns( :Result 2, :Result 3, :Result 4, :Result 5, :Result 6, :Result 7 ),
上記のステップで、データセットが結果 120 までの非常に多くの結果を返し、その分散が 120 を超える結果になる可能性がある場合、データをスタックする JSL スクリプトをコーディングする方法はありますか?
Re: jslを使用して1列の文字列を解析するにはどうすればよいですか?ジムに感謝します。とても良い解決策です
Re: jslを使用して1列の文字列を解析するにはどうすればよいですか?大いに感謝する
Re: jslを使用して1列の文字列を解析するにはどうすればよいですか?データテーブルを考えると

このJSLは必要な新しいテーブルを生成します
names default to here(1);
// Create a handle to point to the data table in question
dt = current data table();
// Convert the Result column into several columns
// Text to columns
dt << Text to Columns(
columns( :Result ),
Delimiters( "|" )
);
// Use a multiple series stack to stack the data
dtStack = dt << Stack(
columns( :Result 2, :Result 3, :Result 4, :Result 5, :Result 6, :Result 7 ),
Source Label Column( "Label" ),
Stacked Data Column( "Data" ),
"Non-stacked columns"n( Keep( :Unit#, :Result 1 ) ),
Number of Series( 2 ),
Output Table( "Untitled 20.jmp" )
);
// Delete unneeded columns
dtStack << delete columns(:Label,:Label2);
// Rename the stacked columns
dtStack:Result 1 << set name ("Number Of Tests");
dtStack:Data << set name("PIN");
dtStack:Data2 << set name("Value");

上記の JSL はすべて、テキストから列への変換、スタックおよび列名の変更などを対話的に実行し、JMP ログに移動して、JMP が生成した JSL をスクリプト ウィンドウにカット アンド ペーストすることによって作成されました。見栄えを良くするために、切り貼りした JSL をクリーンアップすることを告白します。
Re: jsl を使用して 1 列の文字列を解析するにはどうすればよいですか?データテーブルの列を複数の列に分割する (jmp.com)
列を選択してください

列メニューに移動

区切り記号を設定します

OKを押すと結果が得られます

拡張されたログ/ワークフローからスクリプトをコピーし、必要に応じて変更します。
// Text to columns
Data Table("Sheet1") << Text to Columns(columns(:Result), Delimiters("|"));