Projects
Teaching
Data
R scripts
My blog
🔒
R Scripts — Other functions
Enter the password to access this page.
OK
←
Back to R Scripts
⚙️
Other functions
Miscellaneous utility snippets
funfun(data, expr='log(x1/x2)*10^2')
Apply a custom arithmetic expression to columns of a data frame using column aliases x1, x2…
Open ↗
compute_gower_block(start_idx, end_idx, traits_data)
Compute Gower distances for a row subset — use in a loop to handle large trait matrices in memory-sa
Open ↗
pal_ecology()
Ecology-themed colour palettes (biome, ocean, threat, realm)
Open ↗
scale_traits()
Standardise traits: z-score, min-max or unit variance
Open ↗