尋求幫助......我想知道腳本語法是否可能已更改。
我正在對包含數千列的數據表運行一些統計數據和 t 檢定。 然後,我產生一個摘要「組合資料表」來對 p 值列進行排序。 然後我想根據 p 值進行選擇/排除,但它似乎根本不起作用。有什麼想法嗎?
/***********************************/
/*pVal selection*/
// Create the combined data table, using xPath (return a list of the OutlineBoxes from the report that have the title Ordered Differences Report. Then, use the first of those to make the combined data table.)
outlines = (Report( ow1[1] ) << Top Parent) << XPath( "//OutlineBox[text()='Ordered Differences Report']" );
dt1 = outlines[1][Table Box( 1 )] << Make Combined Data Table;
dt1 = current data table();
//Select the rows w/ low pVal, create a String value of all the Column Names, by selected row
pVals = Loc(dt1:"p-Value"n << get as matrix > 0.05);
comparisonStrings = {};
For(i = 1, i <= N Items(pVals), i++,
Insert Into(comparisonStrings, char(dt1:Y[pVals[i]]));
);
show(comparisonStrings);
//Go to source dt, select all Cols that match the string and exclude. You're left with only Cols from charts w low pVal.
dt_Data_Wide << clear select;
dt_Data_Wide << Clear Column Selection();
colList = dt_Data_Wide << Get Column Names( String ); /*gets a list of all columns*/
For( i = 1, i <= N Items( comparisonStrings ), i++,
If( Contains( colList, Char( comparisonStrings[i] ) ),
Column( dt_Data_Wide , Char( comparisonStrings[i] ) ) << Set Selected( 1 ) << exclude( 1 )
)
);
dt_Data_Wide << clear select;
dt_Data_Wide << Clear Column Selection();您的 JSL 沒有執行任何會更改您引用為「dt1」的資料表的操作;如果您想消除 p 值高於 0.05 的行,只需新增
dt1 << select rows(pVals);
dt1 << delete rows;
在你的“Show(compareStrings);”之後
它會產生並設定“ComparisonStrings”列表
它清除來源表的選擇。
它產生列名稱列表
但選擇和排除的循環似乎沒有做任何事情。



您的 JSL 似乎可以在我運行的簡單範例中運行。對於 p 值大於 0.05 的列,它將列屬性設為排除。您發現什麼不同?