4 列 679 行のデータ フレームがあり、genefilter パッケージの da 関数 rowttest を使用して ttest を実行する必要があります。最初の 2 つの列と他の 2 つの列をリストします。
A_R1 A_R2 B_R1 B_R2
1 2 7 7
4 5 8 7.5
5 5 9 NA
6 5 10 NA
...
このコードを使用しましたが、「fac」が何を意味するのかよくわかりません。行数だと思いました。
#t.test is the dataframe used
ttest2=na.omit(ttest)
rowttests(as.matrix(ttest2),fac=679,tstatOnly = FALSE)
このエラーがあります:
Error in function (classes, fdef, mtable) :
unable to find an inherited method for function ‘rowttests’ for signature ‘"matrix", "numeric"’
また
Error in rowcoltt(x, factor(integer(ncol(x))), tstatOnly, 1L) :
Invalid argument 'x': must be a real matrix.
誰かが私を助けることができますか?