darcyj / specificity

R package for calculating specificity in ecological data
7 stars 1 forks source link

Bug on line 212 of calculate_spec_and_pval #5

Open jessuplh opened 1 year ago

jessuplh commented 1 year ago

Line 212 of calculate_spec_and_pval throws error "Error in rao_genetic_max(p = abunds_mat[species_inds_4_max[1]], D = env, : p and D incompatible lengths." when length(species_inds_4_max) == 1.

I think line 212 needs a comma before species_inds_4_max[1].

Full line should read: p=abunds_mat[,species_inds_4_max[1]],

Please advise if this is indeed the error or if it is inappropriate to run analyses when length(species_inds_4_max) == 1.