vmikk / metagMisc

Miscellaneous functions for metagenomic analysis.
MIT License
44 stars 11 forks source link

dist2list, tri == #32

Closed valugome closed 1 month ago

valugome commented 1 month ago

Hi there,

I've been trying to use the dist2list function, however the "tri" argument won't work. distance_df <- dist2list(data4.css.wunifrac, tri = TRUE)

Error in dist2list(data4.css.wunifrac, tri = TRUE) : unused argument (tri = TRUE)

I've already downloaded and loaded the metagMisc library.

Thanks!

vmikk commented 1 month ago

Hello @valugome ,

Unfortunately, I could not reproduce the error you described.
The following code works correctly for me:

library(metagMisc)

dd <- dist(1:10)

d1 <- dist2list(dd, tri = FALSE)
d2 <- dist2list(dd, tri = TRUE)

nrow(d1)
nrow(d2)

Which version of metagMisc you are using? You can install the latest version with remotes::install_github("vmikk/metagMisc")

It's also possible that a function with the same name from another package is causing a conflict in your namespace. If that's the case, try specifying the package name explicitly: metagMisc::dist2list(data4.css.wunifrac, tri = TRUE)

valugome commented 1 month ago

Hello,

Another function with the same name was indeed causing a conflict. metagMisc::dist2list(data4.css.wunifrac, tri = TRUE) worked.

Thank you for your help!