ChiLiubio / microeco

An R package for data analysis in microbial community ecology
GNU General Public License v3.0
181 stars 55 forks source link

trans_env class: Error in vegdist(scale(env[, i, drop = FALSE]), "euclid") : missing values are not allowed with argument 'na.rm = FALSE' #312

Closed xinguo1236 closed 5 months ago

xinguo1236 commented 5 months ago

when I run t1$cal_mantel(by_group = "Group", use_measure = "bray") Error in vegdist(scale(env[, i, drop = FALSE]), "euclid") : missing values are not allowed with argument 'na.rm = FALSE'

Is anything I can do to solve the problem? Many thanks if anyone can help.

ChiLiubio commented 5 months ago

Hi. Thanks. It happened when one variable has same value (only one value). It comes from the "AA" in "LO". I have fixed it by skipping such case. Please reinstall the package from github and try again.

xinguo1236 commented 5 months ago

Thank you very much.