Skip to content

Instantly share code, notes, and snippets.

View burchill's full-sized avatar
💭
I love my default GitHub picture

Zach Burchill burchill

💭
I love my default GitHub picture
View GitHub Profile
@burchill
burchill / hide_geoms.R
Last active November 3, 2021 19:19
Hide ggplot geoms without affecting legends, scaling, etc.
hide_geoms <- function(gg_obj) {
plot_data <- ggplot2::ggplot_build(gg_obj)
data_list = plot_data$data %>%
purrr::map(. %>% mutate(size=0,alpha=0))
plot_data$data <- data_list
return(ggplot2::ggplot_gtable(plot_data))
}
# Example
df1 <- tibble(
@burchill
burchill / package_list.md
Last active February 15, 2019 19:44
A list of some packages / data analysis repos I've made

Packages / data analysis repos I've made

Because I mostly work with human subject data, most of my projects are not able to be made public due to the IRB protocols. However, I've managed to excise some parts of the projects that do not have personally identifiable/demographic information, as well as excerpts from computational projects and other R-related activities I've done.

  • catchr 0.2.0: This the exception to the rule about not being complete--this is my first CRAN-accepted package, and is the only package I've really "done right". Designed to provide a shallower learning curve for condition-handling in R, catchr offers a nice little set of tools for working with conditions in R, utilizing a very simple domain-specific language. catchr 0.1.0 was a very different package, but after a deap dive into the rlang source code, I realized most of it was redundant and redid everything from the ground up. I'm actually relatively proud of this one. For a (so