Skip to content

Instantly share code, notes, and snippets.

View andrewheiss's full-sized avatar
👨‍💻
#rstats-ing all the things

Andrew Heiss andrewheiss

👨‍💻
#rstats-ing all the things
View GitHub Profile
library(tidyverse)
library(parameters)
library(ggdist)

# :(
lm(body_mass ~ 0 + species, data = penguins) |>
  model_parameters() |>
  ggplot(aes(x = Coefficient, y = Parameter, color = Parameter)) +
  geom_pointrange(
library(tidyverse)
ggplot(data = tibble(x = 1, y = "A"), aes(x = x, y = y)) +
geom_pointrange(aes(xmin = 0.5, xmax = 1.5), color = "#1D6996") +
annotate(
geom = "text",
label = "geom_pointrange()",
x = 1,
y = 1.5,
hjust = 0.5,
#!/usr/bin/env bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Create Positron playground project
# @raycast.mode silent
# Optional parameters:
# @raycast.argument1 { "type": "text", "placeholder": "Project folder name" }
# @raycast.icon 🛝

In this paper, the authors explore ████ ███████ ██ ███ ██████████ ██ ███████ ███ █████ ██████ ██ ████████ ██████ ███████████ ███ █████ ██ ██████████ ████ ██ ███████████ ████ ███ ██████ ██ ██████ █████████ █████████ █████ ███ ███ █████ ██ ███ ████ █████████ ███ ████████ █████ ████ ███ ███████████ █████████ █████ ██████████████ ███████ ██ ███ ████ ██████. This is important work!

The theory is strong and the qualitative work is well done and complements the experiment. I have some reservations and questions about the methods and analysis, but these issues are all fixable. I list my observations and comments below.


praise: This is an excellent and tightly written experiment that tests a specific, narrow, important hypothesis in a rigorous way. This is all incredibly fascinating and well done!


library(tidyverse)
library(tidytext)
library(schrute)
library(rcartocolor)
library(ggh4x)
# Get all the words as single rows
all_words <- schrute::theoffice |>
mutate(season_cat = factor(season)) |>
unnest_tokens(output = word, input = text) |>
library(tidyverse)
# Download the annual HadCRUT.5.1.0.0 data from
# https://www.metoffice.gov.uk/hadobs/hadcrut5/data/HadCRUT.5.1.0.0/download.htm
hadcrut <- read_csv(
"HadCRUT.5.1.0.0.analysis.summary_series.global.annual.csv"
) |>
rename(
anomaly = `Anomaly (deg C)`,
conf_low = `Lower confidence limit (2.5%)`,
library(tidyverse)
library(sf)
library(rnaturalearth)
library(ggtext)
clr_ocean <- "#d9f0ff"
clr_land <- "#facba6"
world <- ne_countries(scale = 110) |>
filter(admin != "Antarctica")
alias get_seed='curl "https://www.random.org/integers/?num=1&min=10000000&max=99999999&col=1&base=10&format=plain&rnd=new"'
---
title: "Cross reference fun times"
crossref:
custom:
- kind: float
key: appfig
latex-env: appfig
reference-prefix: Figure A
space-before-numbering: false
latex-list-of-description: Appendix Figure
library(tidyverse)
# Here's some state-level data
some_state_data <- tribble(
~state, ~something,
"Wyoming", 5,
"North Carolina", 9,
"Nevada", 10,
"Georgia", 3,
"Rhode Island", 1,