Comments (4)
Hi Houyun,
Update
I noticed that when the table has the number value as "0", the error warning appeared.
Best,
Bing
from linket.
If I have a matrix with the first whole column of 0 in the matrix. Should I directly delete it from the data frame?
Best,
Bing
from linket.
Hi Bing
I think this happens because the default distance method of spec is bray, but for the bray distance method, the row sum of the data (for each selected group) cannot be 0. So, you can solve this problem by setting the parameter spec_dist = dist_func(.FUN = "vegdist", method = "euclidean").
library(linkET)
set.seed(123)
spec <- data.frame(x = sample(0:2, 100, TRUE), y = sample(0:2, 100, TRUE))
env <- data.frame(x = rnorm(100), y = rnorm(100))
## Error: Reproduce your question
mantel_test(spec, env)
## OK
mantel_test(spec, env, spec_dist = dist_func(.FUN = "vegdist", method = "euclidean"))
from linket.
Hi Bing
I think this happens because the default distance method of spec is bray, but for the bray distance method, the row sum of the data (for each selected group) cannot be 0. So, you can solve this problem by setting the parameter spec_dist = dist_func(.FUN = "vegdist", method = "euclidean").
library(linkET) set.seed(123) spec <- data.frame(x = sample(0:2, 100, TRUE), y = sample(0:2, 100, TRUE)) env <- data.frame(x = rnorm(100), y = rnorm(100)) ## Error: Reproduce your question mantel_test(spec, env) ## OK mantel_test(spec, env, spec_dist = dist_func(.FUN = "vegdist", method = "euclidean"))
In the next update, I'll be more careful with spec's default distance algorithm.
from linket.
Related Issues (20)
- Error in calcCurveGrob(x, x$debug) : 端点两头的值是不能相等的 HOT 3
- `correlate()` not return a matrix of p-value when `adjust = TRUE`
- How to deal with the dataframe with NA? HOT 1
- Need a cor_tbl. HOT 1
- namespace ‘vctrs’ 0.5.1 is already loaded, but >= 0.5.2 is required HOT 1
- Feature requirement for showing the positive or negative correlation in the plot HOT 7
- Caused by error in `spec_dist()`: ! could not find function "spec_dist" HOT 3
- Multiple results for CFLAGS found, something is wrong.FALSE HOT 4
- 是否可以实现热图聚类 HOT 2
- How can I use the subscription or superscription in LinkET HOT 2
- Unsure about the mantel test result HOT 3
- How to fill the missed values in matrix before running linkET? HOT 7
- 是否可以改变Mantel test连线起点和终点的形状和颜色? HOT 1
- 关于geom_square函数设定数据范围的问题 HOT 2
- upcoming 1.0.0 HOT 2
- issue in using different distance matrix for mantel test () HOT 4
- Data volume HOT 4
- what methods to calculate the correlation (r) and p.value in Mantel_test()
- How to add significant level stars in qcorrplot function? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linket.