Closed jxxll closed 8 months ago
The function you're trying to source will probably be in scripts/helper.R
instead.
For future reference, please indicate context and which script were you running when you encountered this error.
Thank you for your reply! I am running the s03_create_communities_2022-10-17.R script and encountered an issue. I found the jaccard_index function in scripts/helper.R, but I faced another problem. They belong to different modules, and I am thinking about how to solve this problem.
jac_ij = jaccard_index(spi_modog_m[shared_ogs,], spj_modog_m[shared_ogs,]) Error in
intersect()
at ../scripts/helper.R:407:8: !x
andy
are not compatible. ✖ Different number of columns: 4 vs 5. Runrlang::last_trace()
to see where the error occurred. spi_modog_m turquoise blue brown yellow VWF 1 0 0 0 ARPC1B 1 0 0 0 FLI1 1 0 0 0 ADGRL4 1 0 0 0spj_modog_m[shared_ogs,] turquoise green yellow brown red VWF 1 0 0 0 0 ARPC1B 0 0 0 0 1 FLI1 1 0 0 0 0 ADGRL4 1 0 0 0 0 DCN 0 0 0 1 0
The jaccard
function this is calling was our own, and it was missing from the helper.R
script. It should be solved now! Thanks for your eagle eye.
cannot open file '../scripts/Cross_species_functions.R': No such file or directory