值排序-使用JSL設置列屬性你好
我需要一些腳本建議,因為關於值排序的列屬性從JMP14更改為JMP15-引入了“自定義順序”
以下腳本在JMP 14中可以正常工作,並且可以在檢查列屬性時看到結果
Summarize( g = by( :BatchVO ), m = Mean( :name("Timestamp") ) );
// JMP 14 Script for value ordering column "BatchVO" in the Order of the values in column "Timestamp"
:BatchVO << Set Property( "Value Ordering", Eval( g[Rank Index( m )] ) );
上面的腳本可在JMP15中使用,但由於新的“自定義訂單”,結果在列屬性中不可見-我想是
有誰知道如何更改它以使其正常工作和在JMP15的列屬性中可見的結果?
以下無效。
Summarize( g = by( :BatchVO ), m = Mean( :name("Timestamp") ) );
//JMP15 Script
:BatchVO << Set Property( "Value Order", {Custom Order(Eval( g[Rank Index( m )] ))} );關於適用於JMP15及更高版本的正確JSL腳本的任何想法嗎?
@martindemel
數據表腳本編寫回复:值排序-使用JSL設置列屬性從“摘要”中為“ g”變量返回的值將作為字符串返回,並且您嘗試將字符串值應用於數字列回复:值排序-使用JSL設置列屬性非常感謝你。
現在,它在列屬性菜單中可見-很好。回复:值排序-使用JSL設置列屬性這個怎麼樣。我陷於規格限制的Set屬性中。謝謝你的幫助
for (r = 1, r <= N Rows(spectable), r++,
specname = spectable:Description[r];
try(
dtcol = Column(datatable, specname);
,
//write("No data for \!"" || specname|| "\!"");
Continue()
);
//write("Setting spec for \!"" || specname|| "\!"\!r");
if(not(ismissing(spectable:LSL[r])) | not(ismissing(spectable:USL[r])),
eval(substitute(expr(dtcol << Set Property("Spec Limits", {LSL(_L), USL(_U), Show Limits(1)})),
expr(_L), spectable:LSL[r],
expr(_U), spectable:USL[r]
));
);
if(spectable:Units[r] != "",
eval(substitute(expr(dtcol << Set Property("Units", _U)),
expr(_U), spectable:Units[r]
));
);
progress = floor((r / N Rows(spectable)) * 100);
dlgStatus[FrameBox(1)] << Add Graphics Script({Fill Color("blue"),Rect(0,1,progress,0,1)});
wait(0.001);
);回复:值排序-使用JSL設置列屬性在我註釋掉“添加圖形代碼”行(您未包括dlgStatus對象)之後,您的代碼對我的示例數據運行良好。 因此,如果它不適用於您的代碼,我懷疑您的數據表中的列名稱與spectable中的description列之間不匹配。
Names Default To Here( 1 );
datatable = Open( "$SAMPLE_DATA/big class.jmp" );
spectable = New Table( "specs",
Add Rows( 2 ),
New Column( "Description", Character, "Nominal", Set Values( {"height", "weight"} ) ),
New Column( "LSL", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [52, 61] ) ),
New Column( "USL", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [70, 175] ) ),
New Column( "Units", Character, "Nominal", Set Values( {"Inches", "Pounds"} ), Set Display Width( 56 ) )
);
For( r = 1, r <= N Rows( spectable ), r++,
specname = spectable:Description[r];
Try(
dtcol = Column( datatable, specname ),
//write("No data for \!"" || specname|| "\!"");
Continue()
);
//write("Setting spec for \!"" || specname|| "\!"\!r");
If( Not( Is Missing( spectable:LSL[r] ) ) | Not( Is Missing( spectable:USL[r] ) ),
Eval(
Substitute(
Expr(
dtcol << Set Property( "Spec Limits", {LSL( _L ), USL( _U ), Show Limits( 1 )} )
),
Expr( _L ), spectable:LSL[r],
Expr( _U ), spectable:USL[r]
)
)
);
If( spectable:Units[r] != "",
Eval( Substitute( Expr( dtcol << Set Property( "Units", _U ) ), Expr( _U ), spectable:Units[r] ) )
);
progress = Floor( (r / N Rows( spectable )) * 100 );
//dlgStatus[FrameBox( 1 )] << Add Graphics Script( {Fill Color( "blue" ), Rect( 0, 1, progress, 0, 1 )} );
Wait( 0.001 );
);回复:值排序-使用JSL設置列屬性您能幫我嗎..使用V13可以正常工作,但是當我升級到V15時,仍然提示設置規格限制時出錯。
順便說一句,此功能是使用第3至第5行作為規範合併2個或更多的csv文件。 謝謝!
回复:值排序-使用JSL設置列屬性日誌中的錯誤消息是什麼?回复:值排序-使用JSL設置列屬性您嘗試將“規格限制”應用到的列是字符數據類型。您需要將其更改為數字。回复:值排序-使用JSL設置列屬性請參閱附件錯誤消息。
