关于R中的对象的问题(应用Wilcox.test时)
这并不是真正的必要性,只是我今天的好奇心。我正在将Wilcox.test应用于第一行与标题相对应的数据框架。 我在r上写了这篇文章:
wilcox.test(TK_O$meanF0 [TK_O$Categoria=="Patient"], TK_O$meanF0 [TK_O$Categoria=="Elderly HC"])
Wilcoxon rank sum test with continuity correction
data: TK_O$meanF0[TK_O$Categoria == "Patient"] and TK_O$meanF0[TK_O$Categoria == "Elderly HC"]
W = 1207, p-value = 0.986
alternative hypothesis: true location shift is not equal to 0
wilcox.test(TK_O$meanF0Hz [TK_O$Categoria=="Patient"], TK_O$meanF0Hz [TK_O$Categoria=="Elderly HC"])
Wilcoxon rank sum test with continuity correction
data: TK_O$meanF0Hz[TK_O$Categoria == "Patient"] and TK_O$meanF0Hz[TK_O$Categoria == "Elderly HC"]
W = 1207, p-value = 0.986
alternative hypothesis: true location shift is not equal to 0
现在,第一行是偶然写的,因为我敢肯定,我的数据框中没有列名为“ Meanf0”的列。正确的版本是Meanf0Hz。 R如何理解我的意思?也许这将有助于我将来更好地理解该软件(如您所见,我仍然不够实用)。
提前致谢!
This is not really a necessity, just a curiosity I had today. I was applying the wilcox.test to a dataframe where the first row corresponds to the header.
I wrote this on R:
wilcox.test(TK_O$meanF0 [TK_O$Categoria=="Patient"], TK_O$meanF0 [TK_O$Categoria=="Elderly HC"])
Wilcoxon rank sum test with continuity correction
data: TK_O$meanF0[TK_O$Categoria == "Patient"] and TK_O$meanF0[TK_O$Categoria == "Elderly HC"]
W = 1207, p-value = 0.986
alternative hypothesis: true location shift is not equal to 0
wilcox.test(TK_O$meanF0Hz [TK_O$Categoria=="Patient"], TK_O$meanF0Hz [TK_O$Categoria=="Elderly HC"])
Wilcoxon rank sum test with continuity correction
data: TK_O$meanF0Hz[TK_O$Categoria == "Patient"] and TK_O$meanF0Hz[TK_O$Categoria == "Elderly HC"]
W = 1207, p-value = 0.986
alternative hypothesis: true location shift is not equal to 0
Now, the first line was written accidentally, as I'm sure there's no column named "meanF0" in my dataframe. The right version is meanF0Hz. How was it possible for R to understand what I meant? Maybe this will help me to better understand the software in the future (as you can probably see, I'm still not practical enough).
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论