We could include a plot (ordered by level of missingness) that would be simpler than what've done
library("funbiogeo")
library("dplyr")
#> Warning: le package 'dplyr' a été compilé avec la version R 4.3.2
#>
#> Attachement du package : 'dplyr'
#> Les objets suivants sont masqués depuis 'package:stats':
#>
#> filter, lag
#> Les objets suivants sont masqués depuis 'package:base':
#>
#> intersect, setdiff, setequal, union
library("ggplot2")
#> Warning: le package 'ggplot2' a été compilé avec la version R 4.3.3
species_traits %>%
tidyr::pivot_longer(-species) %>%
group_by(name) %>%
summarise(n_non_missing = sum(!is.na(value)),
n_missing = sum(is.na(value))) %>%
tidyr::pivot_longer(-name, names_to = "trait_type", values_to = "trait_value") %>%
ggplot(aes(trait_value, name, fill = trait_type)) +
geom_col()
Feature description
We could include a plot (ordered by level of missingness) that would be simpler than what've done
Created on 2024-04-11 with reprex v2.1.0