Projects
Teaching
Data
R scripts
My blog
🔒
R Scripts — Sorting & Data wrangling
Enter the password to access this page.
OK
←
Back to R Scripts
🗃️
Sorting & Data wrangling
Data cleaning, filtering and taxonomic sorting
standard_names(Traits, nrowTraits, source=163, dim=NA)
Standardise species names across datasets by removing duplicates and mismatches.
Open ↗
addToPhylo(phylogenyTraits, GROUPTraits)
Prune a phylogeny to the set of species present in a trait data frame.
Open ↗
RedToTraits(IUCNGROUPtoTraits)
Merge IUCN Red List threat category into a trait data frame by matching species names.
Open ↗
imputation_trait(GROUPData, selectedTraits, shortnames)
Wrapper around missForest to impute missing trait values for a taxonomic group.
Open ↗
filter_completeness()
Remove species below a completeness threshold
Open ↗
merge_by_species()
Robust species-level merge across datasets
Open ↗
pivot_long()
Convert wide trait matrix to long format
Open ↗