Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
T.testr程序_R - Fatal编程技术网

T.testr程序

T.testr程序,r,R,我正在尝试对很多数据集进行t.test,我希望它们包含在一个输出中 到目前为止,我正在做一个类似的t检验 test1=t.test(dat$velocity,x[[1]][[2]]) test2=t.test(dat$velocity,x[[2]][[2]]) test3=t.test(dat$velocity,x[[3]][[2]]) 像这样的方法应该会奏效: tests <- lapply(1:length(x), function(i) t.test(dat$velocity,x[

我正在尝试对很多数据集进行t.test,我希望它们包含在一个输出中 到目前为止,我正在做一个类似的t检验

test1=t.test(dat$velocity,x[[1]][[2]])
test2=t.test(dat$velocity,x[[2]][[2]])
test3=t.test(dat$velocity,x[[3]][[2]])

像这样的方法应该会奏效:

tests <- lapply(1:length(x), function(i) t.test(dat$velocity,x[[i]][[2]]))

测试,谢谢……效果很好……我也知道了如何得到你刚才问过的p值。如果您的原始问题没有得到满意的回答,请编辑该问题以更新更多信息,而不是发布新问题,而不是发布新问题。此外,请阅读Stackoverflow的页面及其页面,了解如何更有效地使用该网站的概述。