Skip to content

Instantly share code, notes, and snippets.

View kpagacz's full-sized avatar
🐍
snek

Konrad Pagacz kpagacz

🐍
snek
View GitHub Profile
@kpagacz
kpagacz / bookmarking_chunk_6.qmd
Created September 29, 2025 09:44
shinylive snippet from bookmarking.qmd chunk 6
# Example handling complex filter scenarios
library(teal)
library(teal.modules.general)
library(teal.data)
# Data with complex relationships for bookmark testing
complex_data <- teal_data()
complex_data <- within(complex_data, {
# Parent dataset
ADSL <- data.frame(
@kpagacz
kpagacz / bookmarking_chunk_5.qmd
Created September 29, 2025 09:44
shinylive snippet from bookmarking.qmd chunk 5
# Ensure bookmark compatibility across teal versions
# Document teal version when creating important bookmarks
# Check current teal version
packageVersion("teal")
packageVersion("teal.modules.general")
packageVersion("teal.modules.clinical")
@kpagacz
kpagacz / bookmarking_chunk_4.qmd
Created September 29, 2025 09:44
shinylive snippet from bookmarking.qmd chunk 4
# Problem: Bookmark created with specific data may not work if data changes
# Solution: Ensure data consistency or version control
# Example of data-dependent bookmark issue:
library(teal)
library(teal.data)
# Original data (when bookmark was created)
original_data <- teal_data()
original_data <- within(original_data, {
@kpagacz
kpagacz / bookmarking_chunk_3.qmd
Created September 29, 2025 09:44
shinylive snippet from bookmarking.qmd chunk 3
# Practical example of bookmark workflow
library(teal)
library(teal.modules.general)
library(teal.data)
library(pharmaverseadam)
data("adsl", package = "pharmaverseadam")
data("adae", package = "pharmaverseadam")
# Create application for bookmark workflow demonstration
@kpagacz
kpagacz / bookmarking_chunk_2.qmd
Created September 29, 2025 09:44
shinylive snippet from bookmarking.qmd chunk 2
# Example showing the breadth of bookmarked state
library(teal)
library(teal.modules.general)
library(teal.data)
library(pharmaverseadam)
data("adsl", package = "pharmaverseadam")
data("adae", package = "pharmaverseadam")
# Create data with complex filtering scenarios
@kpagacz
kpagacz / bookmarking_chunk_1.qmd
Created September 29, 2025 09:44
shinylive snippet from bookmarking.qmd chunk 1
library(teal)
library(teal.modules.general)
library(teal.data)
library(pharmaverseadam)
# Enhanced bookmarking example with multiple modules
data("adsl", package = "pharmaverseadam")
data("adae", package = "pharmaverseadam")
data("advs", package = "pharmaverseadam")
@kpagacz
kpagacz / bookmarking_chunk_0.qmd
Created September 29, 2025 09:44
shinylive snippet from bookmarking.qmd chunk 0
library(teal)
library(teal.modules.general)
library(teal.data)
library(pharmaverseadam)
# Load data for bookmarking demonstration
data("adsl", package = "pharmaverseadam")
data("adae", package = "pharmaverseadam")
# Create teal_data object with join keys
@kpagacz
kpagacz / bookmarking_chunk_3.qmd
Created September 29, 2025 09:41
shinylive snippet from bookmarking.qmd chunk 3
# Practical example of bookmark workflow
library(teal)
library(teal.modules.general)
library(teal.data)
library(pharmaverseadam)
data("adsl", package = "pharmaverseadam")
data("adae", package = "pharmaverseadam")
# Create application for bookmark workflow demonstration
@kpagacz
kpagacz / bookmarking_chunk_2.qmd
Created September 29, 2025 09:41
shinylive snippet from bookmarking.qmd chunk 2
# Example showing the breadth of bookmarked state
library(teal)
library(teal.modules.general)
library(teal.data)
library(pharmaverseadam)
data("adsl", package = "pharmaverseadam")
data("adae", package = "pharmaverseadam")
# Create data with complex filtering scenarios
@kpagacz
kpagacz / bookmarking_chunk_1.qmd
Created September 29, 2025 09:41
shinylive snippet from bookmarking.qmd chunk 1
library(teal)
library(teal.modules.general)
library(teal.data)
library(pharmaverseadam)
# Enhanced bookmarking example with multiple modules
data("adsl", package = "pharmaverseadam")
data("adae", package = "pharmaverseadam")
data("advs", package = "pharmaverseadam")