I'm getting an error when running make_work from the "vegan" R package:
net <- make_network(ps)
Error in .C("veg_distance", x = as.double(x), nr = N, nc = ncol(x), d = double(N * :
"veg_distance" not available for .C() for package "vegan"
Here is my sesion info:
R version 3.4.4 (2018-03-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] vegan_2.5-1 lattice_0.20-35 permute_0.9-4
[4] phyloseqGraphTest_0.0.1 ggplot2_2.2.1 phyloseq_1.22.3
I've seen the other cases related to this error, which advised to uninstall and re-install vegan, which I did (hence the recent update to the package), to no avail.
make_work()
ormake_network()
in vegan: you must be using some other package. Secondly,veg_distance()
cannot be called like that in vegan_2.5-1 (it needs.Call()
instead of.C()
). Thirdly, you should not call the compiled code from your package, but you should call the R functionvegan::vegdist()
. You seem to have a problem with some external package or script. Both CRAN and we checked the vegan 2.5-1 does not break dependent packages, but check the package from which your foundmake_network()
command. – Jari Oksanen.C("veg_distance", ...)
although there was no such a line in vegan 2.5-1. I assumed it was in some other function. However, the situation seems to be that when vegan was upgraded to 2.5-1, phyloseq kept R functions of older vegan (2.4-x) and did not upgrade them. The compiled library was still upgraded and there is a mismatch between compiled library and phyloseq copies of vegan functions. I don't know if this copy was made in build, install or load time. – Jari Oksanen