I’ve been really enjoying reading David Robinson’s ‘Introduction to Empirical Bayes’ book. While I’ve taken multiple stats classes as a graduate student, it is refreshing to have a practical guide to applying Bayesian methods to the analysis of real world data, I especially am enjoying the book because compared to purely theoretical, formula heavy sorts of courses, David Robinson’s book presents first and foremost the intuition behind the madness, and steps through all the additional complications that can really imbue power behind these statistical methods.
Here I just wanted to take a quick second to share a small code snippet that illustrates munging a contiguous dataset to a wide format. What do I mean by that? Consider the following example: let’s say we have a dataset where we have patients A, B, and C, and we take two tissues from each patient - one of Serum and one of TIF (tumor interstitial fluid), and from each tissue assay a whole host of metabolites, each with its own column.
Trying out a new post just to see how this system works. Already found that (featured) images don’t seem to be working on the home page, but do work on the /blog/ subdomain. Also I need to make sure to set the “type: ‘post’” in the YAML header. Anyways, let’s see how beautifully R code renders now again more..
## run in a chunk with
include = FALSE ## library(tidyverse) ## Run within this chunk with echo = TRUE hello_world <- frame_data( ~first, ~second, ~third, ~fourth, "its", "a", "beautiful", "day" ) hello_world ## # A tibble: 1 x 4 ## first second third fourth ## <chr> <chr> <chr> <chr> ## 1 its a beautiful day Now what happens when I generate a plot?