FRBCesab / funbiogeo

:package: R package to help with analyses in functional biogeography
https://frbcesab.github.io/funbiogeo/
GNU General Public License v2.0
10 stars 1 forks source link

Bug when trait completeness matrix contains only one trait #80

Closed Rekyt closed 1 year ago

Rekyt commented 1 year ago

Reprex:

library("funbiogeo")

trait_df = data.frame(
  species = letters[1:3],
  quanti_trait = 1:3
)

# Doesn't work
fb_plot_species_traits_completeness(trait_df)
#> Error in apply(species_traits[, -1], 1, function(x) sum(!is.na(x))): dim(X) doit avoir un longueur positive

Created on 2023-02-24 with reprex v2.0.2