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
Created January 30, 2025 18:53
My R package dev assistant
# About -------------------------------------------------------------------
# This script file is a guide that I use while I'm setting up a new package or
# making changes to existing packages. I started this when I created my first
# package, just to keep track of what I was doing because I was initially very
# confused. It quickly evolved into a workflow reference that I use continuously
# while working on a package. I keep this open in RStudio alongside whichever
# package files I'm editing. Though I may be using it in multiple packages at
# once, it's saved separately from any particular package or project. This way,
# if I need to make an edit then I'm making it once only. The code snippets and
@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) {