Random Code Snippets

Cairo and XQuartz in Mac GitHub Actions

random-code-snippets
cairo
xquartz
development
github
R

Including cairo and xquartz in MacOS github actions

Pie Charts in RCy3

random-code-snippets
rcy3
cyoscape
R

How to represent nodes as pie charts using Cytoscape and RCy3

Dplyr in Packages and Global Variables

random-code-snippets
packages
dplyr
rlang
R

How to include dplyr in a package, and avoid warnings around global variables.

Reusing ggplot2 Colors

random-code-snippets
ggplot2
visualization

When you want to reuse ggplot2 default colors across plots.

Zooming GGraph Plots

graphing
ggraph
visualization
random-code-snippets

Some code demonstrating how to zoom into portions of a ggraph.

R CMD Check and Non-PDF Vignettes

packages
random-code-snippets

R CMD Check complaining about missing files? Here was my solution.

Random Forest Classification Using Parsnip

parsnip
tidymodels
machine-learning
random-forest
random-code-snippets

How to make sure you get a classification fit and not a probability fit from a random forest model using the tidymodels framework.

Coloring Dendrogram Edges with ggraph

random-code-snippets
visualization
graphing
dendrogram

Here is how I got edges colored in a dendrogram with ggraph. Use "node." in front of the node data column you want.

Keeping Figures in an Rmd -- Word Document

random-code-snippets
reproducibility
rmarkdown

How to make your rmarkdown to word conversion also generate a directory of figures.

Highlighting a Row of A ComplexHeatmap

random-code-snippets
heatmap
visualization

A simple way to highlight or bring attention to a row or column in a ComplexHeatmap.

Random Code Snippets

random-code-snippets

Introducing random-code-snippets.

Creating Custom CDFs for Affymetrix Chips in Bioconductor

R
bioconductor
bioinformatics
cdf
affymetrix
microarray
random-code-snippets

Examples of messing with Affymetrix CDF data in Bioconductor.

Package Version Increment Pre- and Post-Commit Hooks

R
git
packages
development
programming
random-code-snippets

Two git commit hooks for incrementing the package version as part of commits.

Custom Deployment Script

R
blogdown
development
random-code-snippets

I don't want to use Netlify for hosting, so I came up with this simple script to deploy my blog.

More articles »

Random Code Snippets

Corrections

If you see mistakes or want to suggest changes, please create an issue on the source repository.

Reuse

Text and figures are licensed under Creative Commons Attribution CC BY 4.0. Source code is available at https://github.com/rmflight/researchBlog_distill, unless otherwise noted. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".