r - 尝试在 R 中运行friedman.test 时错误提示dim(x) 必须具有正长度
问题描述
问这个问题我觉得很傻,但我试图在 R 中做一个简单的friedman.test,但遇到了错误。我想比较各种事物,包括仅在两个样本均值之间进行比较,但出于说明目的,我想比较以下四种均值。
ch03 <- 0.2251
Ic03 <- 0.2181
Pe03 <- 0.1768
Ta03 <- 0.2155
sample<-matrix(c(ch03,Ic03,Pe03,Ta03),ncol=4)
sample
[,1] [,2] [,3] [,4]
[1,] 0.2251 0.2181 0.1768 0.2155
#just doing the most basic thing to get the test working
friedman.test(sample)
#error
Error in apply(y, 1L, rank) : dim(X) must have a positive length
但我认为我正在做的事情应该有效,基于此处的示例在此处输入链接描述
任何想法将不胜感激
解决方案
推荐阅读
- windows - Docker:“无法访问'/var/lib/docker/containers':没有这样的文件或目录”错误
- python - Python Webscraping,如何在网站上导航?
- css - 子 div 不会覆盖父级
- reactjs - TypeScript & React:可重用的通用动作/组件
- hyperledger-fabric - 如何将数据从一个超级账本结构网络迁移到另一个超级账本结构网络?
- php - Laravel 7:无法更新用户表中的记录
- flatbuffers - 查询模式和 JSON 数据转换
- javascript - Chartjs 在不禁用工具提示的情况下禁用悬停颜色更改
- xcode - clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用) Flutter 运行构建失败
- mysql - 如何更新 MySQL(AuroraDB) 中的多行?