Projects
Teaching
Data
R scripts
My blog
🔒
R Scripts — Functional Space
Enter the password to access this page.
OK
←
Back to R Scripts
🧊
Functional Space
Functional space construction, KDE and visualisation
make.PCA(TRAITS, dimensionsAux, savePCA)
Run PCA on a functional trait matrix and save axes and loadings.
Open ↗
density_threshold(z, p)
Find the density value at a given cumulative probability threshold from a KDE grid.
Open ↗
compute_kde(scores, n_grid, lims, thresholds, ...)
Kernel density estimation on PCA scores with multiple threshold contours.
Open ↗
compute_phylopic_positions(scores, species, ...)
Compute x/y positions for phylopic silhouette overlays on a functional space plot.
Open ↗
plot_FS_new(pca_sub, ...)
Plot a functional space with KDE contours, convex hulls and optional phylopic images.
Open ↗