Skip to content

Instantly share code, notes, and snippets.

View jrosen48's full-sized avatar

Joshua Rosenberg jrosen48

View GitHub Profile
sample_id B1 B2 B3 reading_date ward service_line_material
2 8.1 10.8 2.8 aug-15 9 Unknown
4 1.1 BD BD aug-15 1 Copper
7 7.2 1.4 BD aug-15 9 Copper
8 40.6 9.7 6.1 aug-15 9 Lead
12 10.6 1.0 1.3 aug-15 9 Unknown
15 4.4 BD BD aug-15 9 Copper
16 24.4 8.8 4.3 aug-15 5 Galvanized
17 6.6 5.8 1.4 aug-15 2 Unknown
18 4.1 1.1 1.1 aug-15 7 Copper
@gadenbuie
gadenbuie / render_toc.R
Last active July 3, 2023 15:13
Generate Manual Table of Contents in (R)Markdown Documents
#' Render Table of Contents
#'
#' A simple function to extract headers from an RMarkdown or Markdown document
#' and build a table of contents. Returns a markdown list with links to the
#' headers using
#' [pandoc header identifiers](http://pandoc.org/MANUAL.html#header-identifiers).
#'
#' WARNING: This function only works with hash-tag headers.
#'
#' Because this function returns only the markdown list, the header for the
@tjmahr
tjmahr / ggpreview.R
Created October 2, 2017 12:32
ggpreview - preview ggsave output in system image viewer
library(ggplot2)
# preview a file that would be created by ggsave()
ggpreview <- function(...) {
fname <- tempfile(fileext = ".png")
ggsave(filename = fname, ...)
system2("open", fname)
invisible(NULL)
}
Sample Number Date Submitted Analysis (Lead) Lead (pbb) Analysis (Copper Copper (ppb) Street # Street Name City Zip Code
LG07760 2/2/2016 Lead 7 Copper 0 2417 ADAIR ST FLINT 48506
LG02976 1/24/2016 Lead 5 Copper 0 2025 ADAMS FLINT 48505
LG06298 1/30/2016 Lead 1 Copper 0 2118 ADAMS FLINT 48505
LG05008 1/27/2016 Lead 2 Copper 0 1902 ADAMS AVE FLINT 48505
LG05252 1/27/2016 Lead 5 Copper 0 1902 ADAMS AVE FLINT 48505
LG02548 1/22/2016 Lead 0 Copper 90 2009 ADAMS AVE FLINT 48505
LG03070 1/24/2016 Lead 3 Copper 90 2021 ADAMS AVE FLINT 48505
LG02803 1/23/2016 Lead 14 Copper 140 2105 ADAMS AVE FLINT 48505
LG04604 1/26/2016 Lead 1 Copper 60 2306 ADAMS AVE FLINT 48505