num配列を作りたいのですが、どうすればいいですか?例:データテーブルがある場合、最初の2列の平均値と最後の6列の最大値を使用して配列を作成したいのですが、失敗しました。
a=mean(:column 1);
b=mean(:column 2);
c=max(:column 3);
d=max(:column 4);
e=max(:column 5);
f=max(:column 6);
g=max(:column 7);
h=max(:column 8);
array1=[a,b,c,d,e,f,g,h];
私が書いたjslファイルが間違っているのですが、どうすれば修正できますか。どうもありがとうございました。
どうもありがとうございました!それは素晴らしい解決策です。
これが一つの方法です:
NamesDefaultToHere(1);
// Make some data
dt = NewTable("Test",
NewColumn("Col 1", Formula(RandomNormal())),
NewColumn("Col 2", Formula(RandomNormal())),
NewColumn("Col 3", Formula(RandomNormal())),
NewColumn("Col 4", Formula(RandomNormal())),
NewColumn("Col 5", Formula(RandomNormal())),
NewColumn("Col 6", Formula(RandomNormal())),
NewColumn("Col 7", Formula(RandomNormal())),
NewColumn("Col 8", Formula(RandomNormal())),
<< addRows(10)
);
// Get the statistics into a column vector using data table subscripting
myStats = Matrix({
Mean(dt[0, 1]),
Mean(dt[0, 2]),
Max(dt[0, 3]),
Max(dt[0, 4]),
Max(dt[0, 5]),
Max(dt[0, 6]),
Max(dt[0, 7]),
Max(dt[0, 8])
});
Print(Round(myStats, 3));