Skip to content

Instantly share code, notes, and snippets.

View kyleGrealis's full-sized avatar
:atom:
🐰 Adieu, Remy. Tu vas sûrement me manquer

Kyle Grealis kyleGrealis

:atom:
🐰 Adieu, Remy. Tu vas sûrement me manquer
View GitHub Profile
@eliotmonaco
eliotmonaco / pkg-dev-guide.R
Last active April 26, 2025 16:28
My R package dev assistant
# About -------------------------------------------------------------------
# This is a cheatsheet of code snippets and workflows that I've been adding to
# since I started my first package. I keep it open in RStudio while doing any
# dev work so I can execute code directly from the script. It owes a ton to "R
# Packages (2e)" by Hadley Wickham and Jennifer Bryan, still my main package dev
# reference. Please use and modify this as you see fit. FYI, I use RStudio for
# code editing, GitHub for versioning, and pkgdown for the package website, so
# this is written with those tools in mind.
@hypebright
hypebright / shiny-destroy-observer.R
Created March 9, 2024 16:54
Demo demonstrating how to dynamically add and remove Shiny modules, and how to properly clean up modules once removed by using the destroy() method.
# Dynamic UI: demonstrate destroy() method on observer
# This example makes use of a module that dynamically creates pages
# Each server part of the module creates an observer that listens to an actionButton
# Whenever a page is removed, the observer is destroyed. The UI is removed with
# the nav_remove() function.
library(shiny)
library(bslib)
sportsPageUI <- function(id, page_name) {