T-test using two dfs in R

霸气de小男生 提交于 2021-02-11 17:43:02

问题


I am trying to run a t-test to determine if a column in one df is significantly different from a column in another df. I have two dfs, "block 1" and "block 2". I have tried this code:

  t.test(block1$Duration ~ block2$Duration,
       paired=FALSE, var.equal=TRUE)

And I received this error message:

Error in t.test.formula(block1$Duration ~ block2$Duration, paired = FALSE, :
grouping factor must have exactly 2 levels

Any insight into what I'm doing wrong is appreciated!

来源:https://stackoverflow.com/questions/62045080/t-test-using-two-dfs-in-r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!