Skip to content

Instantly share code, notes, and snippets.

View ms609's full-sized avatar

Martin R. Smith ms609

View GitHub Profile
@ms609
ms609 / add_tree_to_mapping.R
Created June 2, 2022 08:26
Add phylogenetic tree to MDS plot of leaves in R
poEdge <- Postorder(tree())$edge
parent <- poEdge[, 1]
child <- poEdge[, 2]
xy <- matrix(0, parent[1], 2)
xy[seq_len(NTip(tree())), ] <- mapping()
for (node in unique(parent)) {
xy[node, ] <- colMeans(xy[child[parent == node], , drop = FALSE])
}
segments(xy[parent, 1], xy[parent, 2],
@ms609
ms609 / README.md
Last active November 24, 2023 10:38
Scientific article PDF redirection

To use:

  1. Install the Tampermonkey (or GreaseMonkey) browser plugin
  2. Open the browser plugin and use the "+" button to add a script
  3. Copy & paste the contents of wiley_pdf.js and elsevier.js to separate scripts
  4. On the "settings" tab, enter the "Raw" URL in the "Updates→Update URL" field

For a more aggressive solution, see the Publication Auto-PDF scripts.