Skip to content

Instantly share code, notes, and snippets.

View sethnr's full-sized avatar

seth redmond sethnr

  • Yale University
  • New Haven, CT
View GitHub Profile
library(ggmap)
library(tidyverse)
# get text addresses -----------------------------------------
locstrings <- c("bridgeport, CT", "350 george st, New Haven, CT", "Yale Whale")
#register_google(key="<<maps API key>>", write=T)
@sethnr
sethnr / second_axis_trick.R
Created September 8, 2025 16:18
quick demo of the second axis trick for labelling line graph categories on the right axis
library(tidyverse)
#test data
testtab <- data.frame("xval" = c(1:10),
"sample1" = sin(1:10),
"sample2" = sin(4:13)) %>%
pivot_longer(contains("sample"),values_to="yval",names_to = "set") %>%
arrange("xval")
#make table of last values