🔒

R Scripts — Other functions

Enter the password to access this page.

⚙️

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…
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
pal_ecology()
Ecology-themed colour palettes (biome, ocean, threat, realm)
scale_traits()
Standardise traits: z-score, min-max or unit variance