Re: データ テーブルをメタデータとして保存する (テーブル変数) JSLhttps://community.jmp.com/t5/Discussions/difference-before-set-and-new-table-variable-strange-results-in/mp/429212/highlight/true#M67868からセットと新しいテーブル変数の違い - 文字列を書き込むと奇妙な結果になる?set/get/new table variable と dt:tablevar の 4 つの異なる関数について説明し、set table variable と dt:tablevar の使用を推奨しています。
Re: データ テーブルをメタデータとして保存する (テーブル変数) JSL格納する変数はデータ テーブルです。 この場合、dt:tablevar は機能しないようです。
Re: データ テーブルをメタデータとして保存する (テーブル変数) JSLテーブル変数は文字列です。
dt_recovered を同じにしたい場合は、テーブル変数に格納するときに dt_metadata を式の文字列表現に変換する必要があります。 変数からそれを取得するときは、それを解析する必要があります。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt_metadata = Open( "$SAMPLE_DATA/Solubility.jmp" );
dt << Set Table Variable( "dt_user", char(dt_metadata));
close(dt_metadata);
dt_recovered = parse(dt << Get Table Variable("dt_user"));
show(dt_recovered);
show(Is String(dt_recovered));
//dt_recovered = Data Table("Solubility.jmp");
//Is String(dt_recovered) = 0;
Re: データ テーブルをメタデータとして保存する (テーブル変数) JSLテーブル B のデータをテーブル A に埋め込む 3 つの例を次に示します。 妥当なサイズのテーブルには dtb3 の例をお勧めします。 dtb4 の例は、あなたが説明したと思います。巨大な B テーブルには適しているかもしれませんが、他の人にとっては非常に不透明です。 dtb5 は 2 つのアイデアを組み合わせたものです。
// Make sample tables. When done, aa will have two table scripts and a table variable.
// the scripts and variables show three ways to embed bb in aa.
dta = New Table( "aa", New Column( "a", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1] ) ) );
dtb = New Table( "bb", New Column( "b", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [2] ) ) );
// dtb3: I think you should do this with a table script because it can be
// opened from the GUI or from JSL. The downside is if the table is
// very large it will be slow to save and slow to open because it is
// making a script to recreate the table.
Eval( Eval Expr( dta << NewScript( "bbb", Expr( dtb << getScript ) ) ) );
// jsl to open:
dtb3 = Eval( dta << getScript( "bbb" ) );
dtb3 << SetName( "dtb3" ); // optional, was "bb 2"
// dtb4: it gets ugly with a table variable, there are several possibilities. This
// will save the table and grab the binary from the disk file and make a character
// string from that. You might choose to do this for a really large file, but I'm
// not sure what issues you'll run into.
dtb << Save( "$temp/bb.jmp" );
blob = Load Text File( "$temp/bb.jmp", blob );
blob = Gzip Compress( blob );// optional
text = Char( blob );
dta << SetTableVariable( "bbbb", text );
// reopen
text = dta:bbbb;
blob = Parse( text );
blob = Gzip Uncompress( blob );//optional
dtb4 = Open( blob, "jmp" );
dtb4 << SetName( "dtb4" ); // optional, was "untitled"
// dtb5: you could combine the two ideas, saving the binary data as a table script so
// it can be used from the GUI
dtb << Save( "$temp/bb.jmp" );
blob = Load Text File( "$temp/bb.jmp", blob );
blob = Gzip Compress( blob );// optional
text = Char( blob );
Eval(
Eval Expr(
dta << NewScript(
"bbbbb",
Local( {text, blob, dt},
text = Expr( text );
blob = Parse( text );
blob = Gzip Uncompress( blob );//optional
dt = Open( blob, "jmp" );
dt;
)
)
)
);
// reopen
dtb5 = Eval( dta << getScript( "bbbbb" ) );
dtb5 << SetName( "dtb5" ); // optional, was "untitled"
Re: データ テーブルをメタデータとして保存する (テーブル変数) JSLまたは、データを埋め込むのではなくリンクを残したい場合は、リンクされたテーブルのファイル名を使用してください。
dta = New Table( "aa", New Column( "a", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1] ) ) );
dtb = New Table( "bb", New Column( "b", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [2] ) ) );
dta << Save( "$temp/aa.jmp" );
dtb << Save( "$temp/bb.jmp" );
// leave table B's filepath in table A
dta << SetTableVariable("path to B", dtb<<GETPATH></GETPATH>データテーブルをメタデータ(テーブル変数)として保存する JSLテーブル変数は、データ テーブル内にメタデータを格納するために使用されます ( JSLドキュメント、一般的なドキュメント)
ただし、文字列としての変数のみに限定されているようです (以下のコードを参照)。
データテーブルをテーブル変数として保存するための最良のオプションは何でしょうか?
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt_metadata = Open( "$SAMPLE_DATA/Solubility.jmp" );
dt << Set Table Variable( "dt_user", dt_metadata );
close(dt_metadata);
dt_recovered = dt << Get Table Variable("dt_user");
show(dt_recovered);
show(Is String(dt_recovered));
//dt_recovered = "Solubility";
//Is String(dt_recovered) = 1;高度な統計モデリング自動化とスクリプト作成データのブレンディングとクリーンアップマスカスタマイゼーションRe: データ テーブルをメタデータとして保存する (テーブル変数) JSL列の場合、ユーザーは列のプロパティを指定できます。また、ユーザー定義のプロパティを定義することもできます。
テーブル用の同様のフレームワークはどうでしょうか?
ここに願いがあります:
テーブルに関する一般情報