问题描述
我正在与以下数据进行关联:
datacor
A tibble: 213 x 3
Prop_coord Prop_assoc PPT
<dbl> <dbl> <dbl>
1 0.474 0.211 92
2 0.343 0.343 85
3 0.385 0.308 83
4 0.714 0 92
5 0.432 0.273 73
6 0.481 0.148 92
7 0.455 0.273 96
8 0.605 0.184 88
9 0.412 0.235 98
10 0.5 0.318 94
# … with 203 more rows
cor.test运作良好,但是当我尝试比较相关性时,会显示此错误:
> cocor(~ Prop_coord+PPT | Prop_assoc+PPT,datacor)
Error in cocor(~Prop_coord + PPT | Prop_assoc + PPT,datacor) :
The variable 'PPT' must be numeric
我该怎么办?
解决方法
只是为了保持记录,其他人帮了我这个忙,问题是cocor似乎不适合小声。因此,当我使用data.frame读取数据时,它可以正常工作。